bugGNU Octave - Bugs: bug #37795, FLTK unresponsive when readline is...


bug #37795: FLTK unresponsive when readline is disabled

Submitted by:  None
Submitted on:  Fri Nov 23 12:07:12 2012  
Category: Plotting with OpenGLSeverity: 1 - Wish
Priority: 3 - LowItem Group: Feature Request
Status: ConfirmedAssigned to: None
Originator Name: Adam AOriginator Email: -unavailable-
Open/Closed: OpenRelease: dev
Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


(Jump to the original submission Jump to the original submission)

Sat Sep 12 15:43:44 2015, comment #9:

Now that the Qt toolkit is merged into Octave, Qt plots are fully functional with or without readline enabled. FLTK still suffers from this problem because it is not threaded like Qt is.

Lowering severity to wishlist. If someone wants to work on some other background event-based way of running the FLTK loop while the Octave interpreter is running, patches are always welcome.

Mike Miller <mtmiller>
Project Administrator
Fri Mar 28 14:05:25 2014, comment #8:

Note that even QtHandles won't be fully functional without the readline event loop. The fact is that the readline event loop is used as a way to feed something to octave to be executed synchronously. In the case of QtHandles, it would be the callbacks.

Using the readline event loop for this kind of purpose is probably not a good idea, but that was the only solution at the time. With the GUI development, there have been other mechanisms added to allow to communicate with octave. I didn't look into it in details, but it might be wise to move the octave/toolkit communication outside of the readline event loop.

Michael Goffioul <goffioul>
Project Member
Fri Mar 28 13:54:55 2014, comment #7:

Or run FLTK in a separate process and communicate over a pipe. Wait... :)

I propose a check in _init_fltk_ similar to the one that is done now to ensure DISPLAY is set, that should fail if readline is not enabled. I'm not sure how to check whether readline is enabled at the moment since it's intentionally hidden behind an abstract interface, but I'm willing to take a look at that if no one else gets to it first.

It's really the fact that functions added to add_input_event_hook will never be executed when readline is disabled. Maybe there should be some generic function to tell whether the input_event_hook is active, rather than conflating it with readline being enabled?

Mike Miller <mtmiller>
Project Administrator
Fri Mar 28 10:56:43 2014, comment #6:

By design, the FLTK backend requires the readline event loop to work properly. So the only workaround is not to use FLTK when readline is not present and active. The other solution is a redesign of the FLTK backend to run in a separate thread, but that's not gonna happen.

Michael Goffioul <goffioul>
Project Member
Fri Mar 28 03:12:11 2014, comment #5:

I can reproduce the problems described here but only if running Octave with --no-line-editing. All of the symptoms described in this report seem to agree with no readline support, either disabled at runtime or not compiled in to Octave to begin with:

  • unresponsiveness of the FLTK plot window
  • unable to close the plot window
  • same behavior when running from emacs, since emacs inferior mode adds the --no-line-editing option

Basically FLTK requires the readline event loop be running. If Octave is not compiled with readline or if it's disabled at runtime, the event loop doesn't run and FLTK won't work.

That's the extent of my knowledge, is there any conceivable way around this? Do we prevent FLTK from being set as the active toolkit when readline is not enabled?

Mike Miller <mtmiller>
Project Administrator
Thu Sep 26 22:10:06 2013, comment #4:

Can anyone duplicate this using the developers sources?

Ben Abbott <bpabbott>
Project Member
Fri Jun 21 10:55:08 2013, comment #3:

As already mentioned, we are facing a similar bug in Debian, see
The difference, however, is that I can only reproduce it if I start Octave from within Emacs via the octave-inferior mode.
Outside, the same code works without problems. Inside, once I have plotted a figure via the fltk toolkit, I cannot close it anymore.


Thomas Weber <tweber>
Thu May 16 19:19:55 2013, comment #2:

I am experiencing exactly what is described below by Adam;
fltk was installed by default on my Suse;
I installed the latest stable fltk version, 1.3.2, but the problem remains.
The piece of code I did the test with:
x = [ 0 1 2 0 1 2]';
y = [ 0 0 0 1 1 1]';
z = [ 0 0 0 0 0 0]';
tri = [ 1 2 4; 2 4 5; 2 3 5; 3 5 6];
c = [ 1 2 3 4 4 6 ]';
shading interp;

I am using octave 3.6.4 on a Suse 12.3 64 bits;

notice that upon exit I get

error: remove_input_event_hook: _fltk_redraw_ not found in list

please re-open this bug;


Laurent <laurent>
Thu Feb 7 09:11:36 2013, comment #1:

I'm no longer having this problem after a recent re-install, so I presume it was due to an installation problem. Feel free to close this report.

Fri Nov 23 12:07:12 2012, original submission:

I'm having problems when using FLTK. When I plot something, the figure window appears and the plot looks correct. However, none of the buttons in the figure window respond to the mouse, and the figure window itself cannot be closed, either by the 'close all' command or by attempting to close the window with the mouse. The window only closes when I finally exit Octave.

These are basically the same symptoms as described in the following Debian bug report (although I am not using Debian). I can't find a corresponding Octave bug report though.

The following code shows this bug on my system:

This is on...
Scientific Linux 6.2
Gnome 2.28.2
Octave 3.6.3
FLTK 1.3.1




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

Attach File(s):

No files currently attached


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -unavailable- added by goffioul (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by bpabbott (Updated the item)
  • -unavailable- added by tweber (Posted a comment)
  • -unavailable- added by laurent (Posted a comment)
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to 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 14 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Sep 12 15:43:44 2015mtmillerSeverity3 - Normal=>1 - Wish
      Priority5 - Normal=>3 - Low
      Item GroupOther=>Feature Request
    Wed Sep 3 13:39:02 2014mtmillerDependencies-=>bugs #43130 is dependent
    Tue Apr 8 16:38:28 2014mtmillerDependencies-=>bugs #37599 is dependent
    Sat Mar 29 19:20:16 2014mtmillerDependencies-=>bugs #30996 is dependent
    Sat Mar 29 19:19:51 2014mtmillerDependencies-=>bugs #31108 is dependent
    Fri Mar 28 03:12:38 2014mtmillerSummaryFLTK - cannot close figure=>FLTK unresponsive when readline is disabled
    Fri Mar 28 03:12:11 2014mtmillerRelease3.6.3=>dev
    Wed Aug 14 15:58:46 2013bpabbottCategoryPlotting=>Plotting with OpenGL
    Thu May 16 19:22:58 2013jordighStatusFixed=>Confirmed
    Thu Feb 7 16:12:21 2013jordighStatusNone=>Fixed

    Back to the top

    Powered by Savane 3.1-cleanup1