bugGNU Octave - Bugs: bug #46039, Refresh when using waitfor

 
 

bug #46039: Refresh when using waitfor

Submitter:  Guillaume <gyom>
Submitted:  Wed 23 Sep 2015 01:50:42 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 23 Nov 2016 10:33:42 AM UTC, comment #4: 

It works now on the dev branch so you can close this report as fixed (even if I don't know which changeset fixed it).

Guillaume <gyom>
Wed 23 Nov 2016 05:34:26 AM UTC, comment #3: 

@Guillaume: Can you re-test this bug in 4.2.0 or the dev branch?

Rik <rik5>
Group administrator
Thu 24 Sep 2015 05:40:02 PM UTC, comment #2: 

Thanks for checking, Pantxo. I actually also only observe the segfault on Octave running in a VM with a single core so this might relate to other specific issues that already transpired in other bug reports; let's ignore this here.

If you add a line in the clbk function to display some text, you will notice that the callback is triggered as expected when pressing the button so the issue seems to be with the refresh of the figure and not the callback per se (adding a call to drawnow() in clbk fixes the issue, but you shouldn't have to).

Guillaume <gyom>
Thu 24 Sep 2015 08:34:10 AM UTC, comment #1: 

Hi,

I can't confirm the segfault (waitfor uncommented):

  • ctrl+C makes the interpreter return to prompt as expected.
  • closing the figure using the window "x" button also makes the interpreter return to prompt as expected


The only issue I can confirm is that the execution of clbk is triggered, as you say, by clicking in the figure or changing the window which has focus. This is consistent with the title of the report so I mark it confirmed.

Pantxo Diribarne <pantxo>
Group Member
Wed 23 Sep 2015 01:50:42 PM UTC, original submission:  

Run the following and press the OK button - the plot will be updated immediately:


function testwaitfor
F = figure;
H = plot(rand(1,10),'Tag','plot');
h = uicontrol(F,...
  'Style','Pushbutton',...
  'String','OK',...
  'Callback',@clbk);
%waitfor(F);

function clbk(varargin)
H = findobj(gcbf,'Tag','plot');
set(H,'ydata',rand(1,10))


Now uncomment the waitfor(F) line: if you press the OK button, the figure will only be updated if you click on it or gives the focus to another window. I also observe that using Ctrl-C while Octave is in the waitfor results in a segfault.

Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 pantxo (Posted a comment)
  • -email is unavailable- added by gyom (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-23 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2015-09-24 pantxo StatusNone Confirmed

    Back to the top

    Powered by Savane 3.14-79a4.
    Corresponding source code