bugGNU Octave - Bugs: bug #42697, test() failures when calling...

 
 

bug #42697: test() failures when calling scripts from function in caller's workspace

Submitter:  Colin Macdonald <cbm>
Submitted:  Mon 07 Jul 2014 04:38:31 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 07 Jul 2014 05:21:27 PM UTC, comment #3: 

closing as duplicate of bug #38236.
if you keep looking into this please post updates there.
thanks.

Carlo de Falco <cdf>
Group Member
Mon 07 Jul 2014 04:55:03 PM UTC, comment #2: 

Hmm, I'll look into that.  In the meantime, I noticed I cannot reproduce on 3.6.4 (but I can on 3.8.1 and hg from about a month ago).

Colin Macdonald <cbm>
Mon 07 Jul 2014 04:45:27 PM UTC, comment #1: 

This looks like a duplicate of bug #38236, is it?
c.

Carlo de Falco <cdf>
Group Member
Mon 07 Jul 2014 04:38:31 PM UTC, original submission:  

See attached example for minimal working example.  The function creates a variable in its caller's workspace, it then calls a script in the callers workspace and tries to print out the value of the new variable.


> isolate
A =  10
yes variable A does exist
A =  10


isolate.m contains a simple test.  "test isolate" works the first time:


> test isolate
A =  10
yes variable A does exist
A =  10
PASSES 1 out of 1 test


But subsequent runs fail:

> test isolate
A =  10
yes variable A does exist
  ***** test
 isolate()
!!!!! test failed
'A' undefined near line 5 column 1


"clear all" makes it work once again.  Its also a bit non-determininistic!  At least my more complicated examples are: might work twice if I make some whitespace changes to my .m files for example.

Probably this has something to do with how the tests are parsed and processed, but its got me stumped!

Colin Macdonald <cbm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #31687:  isolate.m added by cbm (144B - text/x-objcsrc)
file #31688:  isolate_script.m added by cbm (62B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by cbm (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-07 cdf CategoryNone Interpreter
        StatusNone Duplicate
        Open/ClosedOpen Closed
        Operating SystemGNU/Linux Any
    2014-07-07 cbm Attached File- Added isolate.m, #31687
        Attached File- Added isolate_script.m, #31688

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code