bugGNU Octave - Bugs: bug #42596, OpenGL toolkits for the GUI on...

 
 

bug #42596: OpenGL toolkits for the GUI on MacOS X

Submitter:  Ben Abbott <bpabbott>
Submitted:  Sun 22 Jun 2014 03:28:43 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  4 - Important
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Ben Abbott Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 09 Jun 2016 04:34:23 PM UTC, comment #15: 

Yes. The FLTK toolkit does work, but if I use it octave crashes when I exit.

Ben Abbott <bpabbott>
Group Member
Thu 09 Jun 2016 01:04:31 PM UTC, comment #14: 

@Ben: does fltk toolkit also work now? If so then your hypothesis may be true because fltk runs in the interpreter thread, which is not the main thread.

Pantxo Diribarne <pantxo>
Group Member
Thu 09 Jun 2016 11:01:08 AM UTC, comment #13: 

Prior to Apple's switch to clang, the Carbon framework required that the gui thread be the main thread. At some point that changed. Perhaps Apple removed that requirement with clang?


Ben Abbott <bpabbott>
Group Member
Wed 08 Jun 2016 03:09:42 PM UTC, comment #12: 

I think what changed is that we used to use package managers and thus clang for compiling dependencies like Qt, while we used to use gcc to compile Octave itself. This worked until there was some dynamic_cast from Octave functions on Qt objects which crashed the whole GUI. I think I explained that somewhere but can't find it right now.

Pantxo Diribarne <pantxo>
Group Member
Wed 08 Jun 2016 11:07:00 AM UTC, comment #11: 

Yes, this should be closed (but I don' know what changed).

Ben Abbott <bpabbott>
Group Member
Wed 08 Jun 2016 07:09:08 AM UTC, comment #10: 

Can this be closed now?  I assume there would have been more noise if it were still an issue.


Lachlan Andrew <lachlan>
Mon 08 Dec 2014 10:56:10 PM UTC, comment #9: 

Yes, I didn't upgrade to Yosemite partly because of the unappealing messages on maintainers list :-).



Pantxo Diribarne <pantxo>
Group Member
Mon 08 Dec 2014 10:19:39 PM UTC, comment #8: 

I'm running Yosemite and am unable to build the default branch without encountering problems.

Ben Abbott <bpabbott>
Group Member
Mon 08 Dec 2014 10:14:39 PM UTC, comment #7: 

I am at 19386:f054112912df on default.
Can you confirm that saving a new file crashes Octave on default or is this specific to my build?

Pantxo

Pantxo Diribarne <pantxo>
Group Member
Mon 08 Dec 2014 08:25:44 PM UTC, comment #6: 

Pantxo,

Are you building the default or stable branch?

Ben

Ben Abbott <bpabbott>
Group Member
Mon 08 Dec 2014 07:12:00 PM UTC, comment #5: 

Hi,
Using os X 10.9 Mavericks with fink for dependencies.
AFAICS, the crash happens when a dynamic_cast is performed on a Qt object. E.g. if I replace dynamic_cast by static_cast in Figure.cc (Figure::eventNotifyAfter) I can run plot demos with the Qt toolkit and the gui.

That is no solution though. I see similar crashes for example if I create a new file (using the integrated editor) and try to save it: I obtain the attached crash log which shows that it is still in dynamic_cast operation that the crash happens.
 
I am wondering if the bug is related to mixed libc++/libstdc++ as in this thread [1].

As Qt4 is compiled with clang in fink, it is linked with system libc++ while octave is compiled using g++ (4.9 in my case) which links to its own libstdc++. I have no clue on how to proceed, but this may be worth investigating.

[1] http://qt-project.org/forums/viewthread/17150

Pantxo Diribarne <pantxo>
Group Member
Mon 23 Jun 2014 12:45:45 PM UTC, comment #4: 

No. The bug in this instance is that no OpenGL toolkits work for the GUI on MacOS X. 

I'll change the summary to make it more clear.

From the gui, when the commands below are run, the gui exists with the error "octave exited with signal 1".


graphics_toolkit qt
plot (rand (3))


Ben Abbott <bpabbott>
Group Member
Mon 23 Jun 2014 12:26:34 PM UTC, comment #3: 

Then isn't this a duplicate of  bug 40242? The "--no-gui" option leads to a Qt application as main thread: octave interpreter is run in a child thread and it is expected that fltk won't work.

Pantxo Diribarne <pantxo>
Group Member
Mon 23 Jun 2014 11:31:25 AM UTC, comment #2: 

ah-ha.  I wasn't keeping up with the command line options and was using --no-gui instead of -cli.

Using "-cli" I also have a functional FLTK toolkit.

I'm changing the title, but leaving the severity (the OpenGL toolkits do not work with the gui)

Ben Abbott <bpabbott>
Group Member
Mon 23 Jun 2014 08:21:15 AM UTC, comment #1: 

Hi,

Even though I have to patch the sources a bit (otherwise I obtain build failures) my mac build still has functional fltk in cli mode.

Here is my config.:

  • os x 10.9.3
  • fink is used for most dependencies (see octave_build.sh)
  • GraphicsMagick is self compiled (compile flags are commented in the build script)
  • I have to patch _init_fltk_.cc (blindly commented offending code, see x11_mac.patch) in order to be able to build octave, due to duplicate definitions when including x11 headers


Then "./run-octave -cli" leads me to have a functional command line octave with fltk working (at least "demo patch" works fine).
As for Qt toolkit, I never had it work on mac since it was introduced in octave source tree.


(file #31597, file #31598)

Pantxo Diribarne <pantxo>
Group Member
Sun 22 Jun 2014 03:28:43 PM UTC, original submission:  

The last default branch revision for which the cli had a functional FLTK toolkit was 55e376fd8636. Meaning "hg revert -a -r 55e376fd8636" followed by bootstraping, configure, and make produces a functional fltk toolkit on MacOS 10.9.


changeset:   18485:55e376fd8636
branch:      stable
user:        John W. Eaton <jwe@octave.org>
date:        Mon Feb 17 03:32:22 2014 -0500
summary:     Added tag rc-3-8-1-3 for changeset 02ce68d63fba


The next changeset to the default branch was a periodic merge of gui-release to default. However, I don't see anything suspicious in that changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/8473198fd005

In any even, the problem maybe related to the bug #40242 (no GUI interaction outside the main thread on MacOS X).

https://savannah.gnu.org/bugs/?40242

When running the gui, both the qt and fltk toolkits crash when plotting.  The programs exists with "octave exited with signal 11" reported to the terminal.

The crash logs for both fltk and qt are attached.

I'm marking this as a blocker because I think it qualifies.

Ben Abbott <bpabbott>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31597:  octave_build.sh added by pantxo (2KiB - application/x-sh)
file #31598:  x11_mac.patch added by pantxo (2KiB - text/x-diff)
file #31594:  fltk-crash.log added by bpabbott (58KiB - application/octet-stream - GUI crash logs for both the qt and fltk toolkits)
file #31595:  qt-crash.log added by bpabbott (54KiB - application/octet-stream - GUI crash logs for both the qt and fltk toolkits)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lachlan (Posted a comment)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by bpabbott (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-09 rik5 Carbon-CopyRemoved 72865 -
    2016-06-08 bpabbott StatusNone Fixed
        Open/ClosedOpen Closed
    2015-04-25 rik5 Severity5 - Blocker 4 - Important
    2014-06-23 bpabbott SummaryOpenGL toolkits cause seg-faults for the GUI on MacOS X OpenGL toolkits for the GUI on MacOS X
    2014-06-23 bpabbott SummaryOpenGL toolkits cause seg-faults on MacOS X OpenGL toolkits cause seg-faults for the GUI on MacOS X
    2014-06-23 pantxo Attached File- Added octave_build.sh, #31597
        Attached File- Added x11_mac.patch, #31598
    2014-06-22 bpabbott Attached File- Added fltk-crash.log, #31594
        Attached File- Added qt-crash.log, #31595

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code