bugGNU Octave - Bugs: bug #39733, figure window stuck if error while...


bug #39733: figure window stuck if error while executing window callback

Submitted by:  Cristian <r41nm4n>
Submitted on:  Thu 08 Aug 2013 07:04:26 PM UTC  
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 12 Mar 2015 04:26:06 AM UTC, comment #1:

I think this behavior of the FLTK toolkit actually doesn't depend on an error happening at all. The same occurs if you comment out the error line, the reason being that FLTK redraws are normally tied to the readline input loop.

The new Qt toolkit behaves a little differently, the figure is not redrawn for me until focus moves away from the figure window.

If you use the drawnow() function to force a redraw in your callback function, the figure is updated immediately and there is no problem, no matter which toolkit or whether an error occurs later in the callback or not.

I'm going to close this as working, if you want a callback to immediately redraw something on the plot it should be using drawnow. Sorry for the long delay in someone getting to this bug report.

Mike Miller <mtmiller>
Project Administrator
Thu 08 Aug 2013 07:04:26 PM UTC, original submission:

If an error happens during the execution of a callback function such as 'WindowButtonUpFcn', the fltk figure window is stuck until the user presses enter at the console.
Conversely, if the error happens outside a callback function the figure window is correctly updated.

I am attaching a short script that shows the problem:
it displays a red square in the current figure,
then it waits for a mouse click on the current figure window.
After the mouse click, it generates an error.
It should be then possible to verify that the figure window is not refreshed or updated until "enter" is pressed at the console. Only after pressing enter the figure should be correctly updated with a green square.

The expected behaviour would be that the figure window is never stuck after an error in the callback function.

Cristian <r41nm4n>


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

Attach Files:

Attached Files
file #28800:  error_in_callback.m added by r41nm4n (582B - 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 mtmiller (Posted a comment)
  • -email is unavailable- added by r41nm4n (Submitted the item)
  • -email is unavailable- added by r41nm4n

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Thu 12 Mar 2015 04:26:06 AM UTC mtmiller StatusNone => Works For Me
        Open/ClosedOpen => Closed
    Thu 08 Aug 2013 07:04:26 PM UTC r41nm4n Attached File- => Added error_in_callback.m, #28800
        Carbon-Copy- => Added r41nm4n

    Back to the top

    Powered by Savane 3.3