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


bug #37795: FLTK unresponsive when readline is disabled

Submitted by:  None
Submitted on:  Fri 23 Nov 2012 12:07:12 PM UTC  
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 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 12 Sep 2015 03:43:44 PM UTC, 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 28 Mar 2014 02:05:25 PM UTC, 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 28 Mar 2014 01:54:55 PM UTC, 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 28 Mar 2014 10:56:43 AM UTC, 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 28 Mar 2014 03:12:11 AM UTC, 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 26 Sep 2013 10:10:06 PM UTC, comment #4:

Can anyone duplicate this using the developers sources?

Ben Abbott <bpabbott>
Project Member
Fri 21 Jun 2013 10:55:08 AM UTC, 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 16 May 2013 07:19:55 PM UTC, 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 07 Feb 2013 09:11:36 AM UTC, 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 23 Nov 2012 12:07:12 PM UTC, 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 15 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 18 Apr 2018 05:45:13 PM UTCmtmillerDependencies-=>bugs #53682 is dependent
    Sat 12 Sep 2015 03:43:44 PM UTCmtmillerSeverity3 - Normal=>1 - Wish
      Priority5 - Normal=>3 - Low
      Item GroupOther=>Feature Request
    Wed 03 Sep 2014 01:39:02 PM UTCmtmillerDependencies-=>bugs #43130 is dependent
    Tue 08 Apr 2014 04:38:28 PM UTCmtmillerDependencies-=>bugs #37599 is dependent
    Sat 29 Mar 2014 07:20:16 PM UTCmtmillerDependencies-=>bugs #30996 is dependent
    Sat 29 Mar 2014 07:19:51 PM UTCmtmillerDependencies-=>bugs #31108 is dependent
    Fri 28 Mar 2014 03:12:38 AM UTCmtmillerSummaryFLTK - cannot close figure=>FLTK unresponsive when readline is disabled
    Fri 28 Mar 2014 03:12:11 AM UTCmtmillerRelease3.6.3=>dev
    Wed 14 Aug 2013 03:58:46 PM UTCbpabbottCategoryPlotting=>Plotting with OpenGL
    Thu 16 May 2013 07:22:58 PM UTCjordighStatusFixed=>Confirmed
    Thu 07 Feb 2013 04:12:21 PM UTCjordighStatusNone=>Fixed

    Back to the top

    Powered by Savane 3.1-cleanup1