Menu

#304 Save new project causes segfault

open
nobody
Interface (43)
5
2013-03-18
2012-04-01
Anonymous
No

Meshlab trunk: HEAD of today, but also present in all versions of the past months.

When saving a new project on Ubuntu, a segfault occurs. I can work around it by applying this hack:

Index: meshlab/mainwindow_RunTime.cpp

--- meshlab/mainwindow_RunTime.cpp (revision 5640)
+++ meshlab/mainwindow_RunTime.cpp (working copy)
@@ -1493,7 +1493,8 @@

/*WARNING!!!!!! CHANGE IT!!! ALSO IN THE OPENPROJECT FUNCTION**/
meshDoc()->setDocLabel(fileName);

  • mdiarea->activeSubWindow()->setWindowTitle(meshDoc()->docLabel());
  • if (mdiarea->activeSubWindow() )
  • mdiarea->activeSubWindow()->setWindowTitle(meshDoc()->docLabel());
    layerDialog->setWindowTitle(meshDoc()->docLabel());
    /************/

The problem is that for some reason, there's no activeSubWindow()

This bug is present for quite some revisions already.

Discussion

  • Antonio Martos

    Antonio Martos - 2012-12-11

    Same here. This happens at least in 1.3.0 binaries as included in Mint 14 (nadia) repositories and also in 1.3.2 from:

    https://launchpadlibrarian.net/111065780/meshlab_1.3.2_amd64.deb

    So, it seems to be quite widespread and that would make Meshlab almost unusable in many recent Ubuntu/Mint based system.

    martos@fx ~ $ gdb meshlab
    GNU gdb (GDB) 7.5-ubuntu
    ...
    This GDB was configured as "x86_64-linux-gnu".
    (gdb) r
    Starting program: /usr/bin/meshlab
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

    Go to File / Save Project
    Enter file name
    Press Save button and crashes:

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff5d4d4b9 in QWidget::windowTitle() const ()
    from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
    (gdb) c
    Continuing.
    [Thread 0x7fffd5a5e700 (LWP 18186) exited]
    [Thread 0x7fffd689b700 (LWP 18185) exited]

    Program terminated with signal SIGSEGV, Segmentation fault.
    The program no longer exists.

    tail of: >ltrace meshlab

    _ZNK8QMdiArea16currentSubWindowEv(0x206ba40, 0x2587dc0, 0x4e6f20, 0, 0) = 0x25a17b0
    _ZNK11QMetaObject4castEP7QObject(0x4e6f20, 0x25a17b0, 0x257b2c0, 0, 0) = 0
    _ZNK8QMdiArea16currentSubWindowEv(0x206ba40, 0x25a17b0, 0, 0, 0) = 0x25a17b0
    _ZNK8QMdiArea16currentSubWindowEv(0x206ba40, 0, 0x257b2c0, 0, 0) = 0x25a17b0
    _ZNK13QMdiSubWindow6widgetEv(0x25a17b0, 0, 0x257b2c0, 0, 0) = 0x2587dc0
    _ZNK11QMetaObject4castEP7QObject(0x4e6f20, 0x2587dc0, 0x257b2c0, 0, 0) = 0x2587dc0
    _ZNK8QMdiArea15activeSubWindowEv(0x206ba40, 0x2587dc0, 0x4e6f01, 0, 0) = 0
    _ZN7QWidget14setWindowTitleERK7QString(0, 0x7fff34f281f0, 0x4e6f01, 0, 0 <unfinished ...="">
    --- SIGSEGV (Segmentation fault) ---
    +++ killed by SIGSEGV +++</unfinished>

     
  • Paco Escarpa

    Paco Escarpa - 2013-03-18

    This hack works for 1.3.0 on gcc (SUSE Linux) 4.7.1 20120723 [gcc-4_7-branch revision 189773] (OpenSUSE 12.2)

     
  • Paco Escarpa

    Paco Escarpa - 2013-03-18

    Sorry, 1.3.3

     

Log in to post a comment.

MongoDB Logo MongoDB