(
Jump to the original submission)
Thu 21 Feb 2013 12:02:45 AM UTC, comment #6:
It's not a race condition, but it is odd. I've downgraded the severity because this isn't really damaging to anyone.
I believe the issue is that the single line, even with semicolons, is being evaluated in a single temporary working space.
For example, try this code:
which results in
What is interesting is that k has not even been defined for the first execution of 'whos' and yet it is still showing up in the symbol table.
|
Mon 14 Jan 2013 10:36:38 PM UTC, comment #5:
Now I'm thinking it's not a question of giving time between clear and whos. I tried introducing pause statements between the two with 1-second delays, and that doesn't resolve the behavior, but putting them on separate lines does. Some code triggered only on end-of-line or end-of-file but not semicolons perhaps?
Either way, feel free to downgrade its priority.
|
Mon 14 Jan 2013 10:20:34 PM UTC, comment #4:
That's an interesting race condition! To add more information, leaving everything in one line still works properly from the file; I suppose the file-reading introduces enough delay to break the race.
As this race would show up only if whos is called immediately after clear, feel free to downgrade its priority.
|
Mon 14 Jan 2013 09:08:17 PM UTC, comment #3:
Right, with second whos on new line
it works.
|
Mon 14 Jan 2013 08:45:37 PM UTC, comment #2:
This looks like a race condition?
The problem isn't whether it's from an m-file or not, but whether you give it enough time to finish or not.
Try running the second whos in a separate line, for example.
|
Mon 14 Jan 2013 07:54:13 PM UTC, comment #1:
I see same behavior of Fedora 17.
Looks like a bug.
|
Mon 14 Jan 2013 07:49:02 PM UTC, original submission:
I noticed this odd behavior crop up recently with "clear all" and "whos". It does not break any of my code, but I thought I should report it if it is a symptom of something deeper.
Try running the following from the octave command prompt:
On my system (Ubuntu 12.04.1 64 bit on x86_64) the output is:
HOWEVER: creating a .m script file with the above line of code and then calling that script makes "clear all" work properly, and the second "whos" does not list any variables in that case.
Could someone please verify this behavior?
|
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach File(s):
Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follow 3 latest changes.