bugGNU Octave - Bugs: bug #50198, Calling "error" from the...


bug #50198: Calling "error" from the GUI thread lead to segfaults

Submitted by:  Pantxo Diribarne <pantxo>
Submitted on:  Tue 31 Jan 2017 02:14:48 PM UTC  
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

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


Tue 07 Nov 2017 10:18:23 PM UTC, comment #3:

As suggested by Rik in some bug report, I tried the approach of catching octave::execution_exception thrown in the GUI thread by opengl graphics functions and rethrowing them in the interpreter thread using octave_link::post_event. At least Octave is able to recover from error (see attached diff). The output message is a bit messed up though and the error is interpreted as a "parse error":

At that point the Qt figure has recovered its original size so it means unwind_protect_cleanup blocks have been properly executed.

Pantxo Diribarne <pantxo>
Project Member
Tue 31 Jan 2017 03:13:03 PM UTC, comment #2:

Thanks, I'll try to take a look at this soon.

John W. Eaton <jwe>
Project Administrator
Tue 31 Jan 2017 03:00:47 PM UTC, comment #1:

I attached the backtrace of the GUI thread

(file #39626)

Pantxo Diribarne <pantxo>
Project Member
Tue 31 Jan 2017 02:14:48 PM UTC, original submission:

Since I don't know how to provoke an error in the GUI thread, I intensionally added a call to "error" in gl2ps_renderer::draw.

After recompiling with this in place I can see that printing with fltk returns gracefully while with Qt (which runs the the gl2ps_renderer from the GUI thread):

Pantxo Diribarne <pantxo>
Project Member


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

Attach File(s):

Attached Files
file #39626:  btGUI.txt added by pantxo (1KiB - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by pantxo (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):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 31 Jan 2017 03:00:47 PM UTCpantxoAttached File-=>Added btGUI.txt, #39626

    Back to the top

    Powered by Savane 3.1-cleanup1