bugGNU Octave - Bugs: bug #54169, Test suite crashes when Octave...

 
 

bug #54169: Test suite crashes when Octave built with Qt and FLTK

Submitted by:  Andrew Janke <apjanke>
Submitted on:  Sat 23 Jun 2018 04:22:02 AM UTC  
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Patch Submitted Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  4.4.0 Operating System:  Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 11 Jul 2018 04:55:58 PM UTC, comment #5:

I think the proposed patch is OK as a quick fix, but it doesn't prevent someone from later registering the fltk toolkit on a mac when the interpreter is not running in the main thread. So longer term, maybe a better solution is needed that really does check for the situation we are trying to avoid.

John W. Eaton <jwe>
Project Administrator
Wed 11 Jul 2018 04:52:29 PM UTC, comment #4:

So instead of

we might use something like

? Assuming an appropriate "have_graphics_toolkit" function..

I see that in a few other places, we already use

which is also OK with me, and avoids adding yet another function.

John W. Eaton <jwe>
Project Administrator
Sun 24 Jun 2018 11:48:18 PM UTC, comment #3:

The patch kind of works. Looks like it sets up the toolkits right, but now there are test suite failures.

Default `octave`:

With `octave --no-gui-libs`:

In the Qt GUI:

The test suite now runs to completion without crashing for me.

But looks like some tests contingent on `HAVE_FLTK` are now failing:

Maybe these need to be conditioned on a run-time test for the toolkit?

Attaching a full test log.

Andrew Janke <apjanke>
Sun 24 Jun 2018 07:15:47 PM UTC, comment #2:

@Andrew: "octave --no-gui" is now the default (equivalent to "octave") and you need to add "--gui" to have the GUI application running, but in either case it is unsafe to run fltk since it will end up being run from a non-main thread.

The attached patch should disallow the use of fltk when the interpreter is not running in the main thread.

Can you confirm that the patch works, e.g.

"fltk" should not be in the list.

Now "fltk" should be listed but not "qt".

(file #44423)

Pantxo Diribarne <pantxo>
Project Member
Sun 24 Jun 2018 05:54:19 PM UTC, comment #1:

Yes, Mac OS is not as permissive as other OSs when it comes to running GUI components from a thread that is not the main one.

When running Octave in pure cli mode FLTK is ran in the main thread (together with the interpreter) which explains why the crash does not occur.

I'll mark this bug as confirmed since I recall having seen similar issues a while ago when I had a MAC.

Pantxo Diribarne <pantxo>
Project Member
Sat 23 Jun 2018 04:22:02 AM UTC, original submission:

When I build Octave 4.4.0 with Qt and run the test suite with _run_test_suite_, it crashes part way through the test suite. Happens both under --force-gui and --no-gui.

I don't know if this is happening in the dev branch, because I currently cannot get dev to build.

I believe this is Qt and/or FLTK related, because when I run it under --no-gui, there's a stack trace, and it's talking about a call being done from the wrong thread, and Qt and FLTK show up in the stack trace. The crash does not occur in octave 4.4.0 build --without-qt.

Here's the stack trace from the error when running --no-gui.

Andrew Janke <apjanke>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44428:  fntests-with-fltkmac-patch.log.gz added by apjanke (1MiB - application/x-gzip - Test suite results when built with fltkmac.patch)
file #44423:  fltkmac.patch added by pantxo (1KiB - 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 jwe (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by apjanke (Submitted the item)
  •  

    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.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-24 apjanke Attached File- => Added fntests-with-fltkmac-patch.log.gz, #44428
    2018-06-24 pantxo Attached File- => Added fltkmac.patch, #44423
        StatusConfirmed => Patch Submitted
    2018-06-24 pantxo CategoryInterpreter => Plotting with OpenGL
        StatusNone => Confirmed
    2018-06-23 apjanke Attached File- => Added octave_4.4.0 build logs - 8dcd9d5831d3d3568d4e51ea3ca6fb93-09e64e05a46eb58baf1baee32af3fd769b94fb4c.zip, #44418

    Back to the top


    Powered by Savane 3.3