bugGNU Octave - Bugs: bug #45199, Segfault in annotation-dialog.cc


bug #45199: Segfault in annotation-dialog.cc

Submitter:  Andreas Weber <andy1978>
Submitted:  Thu 28 May 2015 06:35:12 AM UTC
Category:  Plotting with OpenGL Severity:  4 - Important
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.0 Operating System:  * GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Tue 02 Jun 2015 07:12:56 PM UTC, comment #5: 

I pushed the patch on the stable branch:

Closing report.

Pantxo Diribarne <pantxo>
Project Member
Tue 02 Jun 2015 04:50:55 PM UTC, comment #4: 

Retagging release from 4.0.0-rc4 to 4.0.0.

John W. Eaton <jwe>
Project Administrator
Mon 01 Jun 2015 10:27:19 PM UTC, comment #3: 

The attached patch fixes this bug for me. It also fixes bug #45222 at the same time.

(file #34145)

Pantxo Diribarne <pantxo>
Project Member
Thu 28 May 2015 09:57:08 PM UTC, comment #2: 

Looks like my memory fails me [1], both "--no-gui" and plain GUI modes use a QApplication.

The problem is that the resource_manager hasn't been initialized: just calling resource_manager::reload_settings (); before any use of the resource manager (in annotation-dialog.cc) fixes the issue for me.

This should probably be done in octave-gui.cc

[1] http://hg.savannah.gnu.org/hgweb/octave/rev/1ed269bdea58

Pantxo Diribarne <pantxo>
Project Member
Thu 28 May 2015 08:43:00 AM UTC, comment #1: 


I had already reported this on the maintainers ml, but forgot to file the bug report. Thanks.

A major difference between the "--no-gui" and plain gui modes from the Qt point of view is the kind of application that is used: QCoreApplication [1] in "--no-gui", and QApplication in plain GUI.

I'd try to look in that direction, since even in "--no-gui" mode we do need gui (figures and dialogs).

[1] http://doc.qt.io/qt-4.8/qcoreapplication.html#details

Pantxo Diribarne <pantxo>
Project Member
Thu 28 May 2015 06:35:12 AM UTC, original submission:  

8a25649b9c77 (stable)

Start with "--no-gui", run "peaks" (now the Qt plotting window pops up), select "Insert Text", click on the plot:

bt (unfortunately without debugging symbols)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2a26900 in QSettings::value(QString const&, QVariant const&) const () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
(gdb) bt
#0  0x00007ffff2a26900 in QSettings::value(QString const&, QVariant const&) const () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#1  0x00007ffff7ac3bed in annotation_dialog::init (this=this@entry=0x7fffffffb8f0) at ../../octave/libgui/graphics/annotation-dialog.cc:56
#2  0x00007ffff7ac41f3 in annotation_dialog::annotation_dialog (this=0x7fffffffb8f0, p=<optimized out>, pr=...) at ../../octave/libgui/graphics/annotation-dialog.cc:45
#3  0x00007ffff7ad5d50 in QtHandles::Canvas::canvasMouseReleaseEvent (this=0x75cd08, event=<optimized out>) at ../../octave/libgui/graphics/Canvas.cc:799
#4  0x00007ffff2feb748 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#5  0x00007ffff3af7511 in QGLWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4
#6  0x00007ffff2f9848c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#7  0x00007ffff2f9f10f in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#8  0x00007ffff2a6871d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007ffff2f9e76f in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()

I can build Octave with debugging symbols tonight

Andreas Weber <andy1978>
Project Member


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

Attach Files:

Attached Files
file #34145:  fix_fig_locale.patch added by pantxo (4KiB - text/x-diff)


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 andy1978 (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 project members can vote.





    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-02 pantxo StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2015-06-02 jwe Release4.0.0-rc4 4.0.0
    2015-06-01 pantxo Attached File- Added fix_fig_locale.patch, #34145
        StatusConfirmed Ready For Test
    2015-05-28 pantxo StatusNone Confirmed

    Back to the top

    Powered by Savane 3.9