bugGNU Octave - Bugs: bug #54443, clear in a user script causes the...

 
 

bug #54443: clear in a user script causes the workspace panel to be updated

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 03 Aug 2018 11:57:23 PM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 10 Aug 2018 03:56:33 PM UTC, comment #2: 

The patch works fine.  I added the bug number to the commit message and checked it in on the development branch here (https://hg.savannah.gnu.org/hgweb/octave/rev/3c9134d90d6e).

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Tue 07 Aug 2018 05:58:48 PM UTC, comment #1: 

The workspace is explicitly updated by 'clear' in variables.cc. Removing 'octave_link::set_workspace' in 'clear' should already do the trick (see attached patch).

(file #44736)

Torsten Lilge <ttl>
Group Member
Fri 03 Aug 2018 11:57:23 PM UTC, original submission:  

If the following is saved as a script file, testscript.m,


x = 1;
y = 2;
for i = 1:25
  pause (0.2);
endfor


then the script runs for 5 seconds, during which the GUI workspace panel stays blank. After the script finishes completely, the workspace panel shows i, x, and y.

If the script is changed to the following,


x = 1;
y = 2;
for i = 1:25
  clear nosuchvariable
  pause (0.2);
endfor


the 'clear' command causes the GUI workspace panel to be updated while the script is executing, showing the value of i iterating from 1 to 25.

I don't think using the 'clear' command in a user script should trigger the workspace panel to update unexpectedly. Normally the workspace only updates when control is returned to the user, when a script or function call returns to the prompt, when the debugger is activated, or when an input function such as  'input' or 'kbhit' is called.

Mike Miller <mtmiller>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44736:  bug54443_v01.patch added by ttl (733B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by ttl (Updated the item)
  • -email is unavailable- added by mtmiller (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-10 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
        Release4.4.0 dev
    2018-08-07 ttl Attached File- Added bug54443_v01.patch, #44736
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code