Switching a session causes the IDE to segfault #1430

Closed
jamshark70 opened this Issue Apr 18, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@jamshark70
Contributor

jamshark70 commented Apr 18, 2015

Current master, Ubuntu 12.04, Qt5.4.1. Loading a previously-saved session brings down the IDE. It doesn't matter if you do it by Session menu > Open session or Session menu > Switch session. Both trigger a segfault.

gdb stack trace (build style = RelWithDebInfo):

#0  0x0000007200650064 in ?? ()
#1  0x00007ffff7778419 in QMetaObject::cast(QObject*) const ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#2  0x00000000004a0793 in qobject_cast<ScIDE::Document*> (
    object=<optimized out>)
    at /home/dlm/share/Qt5.4.1/5.4/gcc_64/include/QtCore/qobject.h:520
#3  QtPrivate::QVariantValueHelper<ScIDE::Document*>::object (v=...)
    at /home/dlm/share/Qt5.4.1/5.4/gcc_64/include/QtCore/qvariant.h:697
#4  0x000000000049d812 in invoke (a=...)
    at /home/dlm/share/Qt5.4.1/5.4/gcc_64/include/QtCore/qvariant.h:96
#5  qvariant_cast<ScIDE::Document*> (v=...)
    at /home/dlm/share/Qt5.4.1/5.4/gcc_64/include/QtCore/qvariant.h:823
#6  value<ScIDE::Document*> (this=0x7fffffffb9f0)
    at /home/dlm/share/Qt5.4.1/5.4/gcc_64/include/QtCore/qvariant.h:343
#7  ScIDE::MultiEditor::documentForTab (this=this@entry=0x9de240, 
    index=index@entry=0)
    at /home/dlm/share/sc-hjh.git/editors/sc-ide/widgets/multi_editor.cpp:1076
#8  0x000000000049d892 in ScIDE::MultiEditor::tabForDocument (
    this=this@entry=0x9de240, doc=0x119b230)
    at /home/dlm/share/sc-hjh.git/editors/sc-ide/widgets/multi_editor.cpp:1083
#9  0x000000000049d8da in ScIDE::MultiEditor::setCurrentEditor (this=0x9de240, 
    editor=0x18d2b20)
    at /home/dlm/share/sc-hjh.git/editors/sc-ide/widgets/multi_editor.cpp:1115
#10 0x00007ffff77a201a in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#11 0x00000000004ea8ff in ScIDE::CodeEditorBox::currentChanged (
    this=<optimized out>, _t1=0x18d2b20)
    at /home/dlm/share/sc-hjh.git/buildqt5/editors/sc-ide/widgets/moc_editor_box.cpp:174
#12 0x000000000047adfa in ScIDE::CodeEditorBox::onDocumentClosed (
    this=0x11c20d0, doc=<optimized out>)
    at /home/dlm/share/sc-hjh.git/editors/sc-ide/widgets/editor_box.cpp:95
#13 0x00000000004ea9ec in ScIDE::CodeEditorBox::qt_static_metacall (
    _o=<optimized out>, _c=<optimized out>, _id=<optimized out>, 
    _a=<optimized out>)
    at /home/dlm/share/sc-hjh.git/buildqt5/editors/sc-ide/widgets/moc_editor_box.cpp:95
#14 0x00007ffff77a201a in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#15 0x00000000004e8ac2 in ScIDE::DocumentManager::closed (
    this=<optimized out>, _t1=0x117d6b0)
    at /home/dlm/share/sc-hjh.git/buildqt5/editors/sc-ide/core/moc_doc_manager.cpp:456
#16 0x0000000000440433 in ScIDE::DocumentManager::close (this=0x994d00, 
    doc=0x117d6b0)
    at /home/dlm/share/sc-hjh.git/editors/sc-ide/core/doc_manager.cpp:475
#17 0x000000000049dfae in ScIDE::MultiEditor::switchSession (this=0x9de240, 
    session=0xbae8c0)
    at /home/dlm/share/sc-hjh.git/editors/sc-ide/widgets/multi_editor.cpp:864
#18 0x00007ffff77a201a in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#19 0x00000000004e9a92 in ScIDE::SessionManager::switchSessionRequest (
    this=<optimized out>, _t1=0xbae8c0)
    at /home/dlm/share/sc-hjh.git/buildqt5/editors/sc-ide/core/moc_session_manager.cpp:154
#20 0x000000000047685e in ScIDE::SessionManager::openSession (this=0xa0ede0, 
    name=...)
    at /home/dlm/share/sc-hjh.git/editors/sc-ide/core/session_manager.cpp:118
#21 0x000000000048ba5b in ScIDE::MainWindow::onOpenSessionAction (this=
    0xa15910, action=<optimized out>)
    at /home/dlm/share/sc-hjh.git/editors/sc-ide/widgets/main_window.cpp:806
#22 0x00007ffff77a201a in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#23 0x00007ffff42b47f2 in QMenu::triggered(QAction*) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#24 0x00007ffff42ba0dd in ?? ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#25 0x00007ffff77a201a in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#26 0x00007ffff412c6b2 in QAction::triggered(bool) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#27 0x00007ffff412e4d7 in QAction::activate(QAction::ActionEvent) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#28 0x00007ffff42b57ea in ?? ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#29 0x00007ffff42bcf0f in ?? ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#30 0x00007ffff42bde50 in QMenu::mouseReleaseEvent(QMouseEvent*) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#31 0x00007ffff4174b9c in QWidget::event(QEvent*) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#32 0x00007ffff42bfc5b in QMenu::event(QEvent*) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#33 0x00007ffff41392b4 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#34 0x00007ffff413ca4c in QApplication::notify(QObject*, QEvent*) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#35 0x00007ffff776fe24 in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#36 0x00007ffff413b978 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#37 0x00007ffff418f82e in ?? ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#38 0x00007ffff4192648 in ?? ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#39 0x00007ffff41392b4 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#40 0x00007ffff413cc86 in QApplication::notify(QObject*, QEvent*) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Widgets.so.5
#41 0x00007ffff776fe24 in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#42 0x00007ffff35a7fa7 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Gui.so.5
#43 0x00007ffff35a8a35 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Gui.so.5
#44 0x00007ffff358d728 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Gui.so.5
#45 0x00007fffe9deea10 in ?? ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/plugins/platforms/libqxcb.so
#46 0x00007ffff1a52d13 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007ffff1a53060 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007ffff1a53124 in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007ffff77ca5e4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#50 0x00007ffff776e04b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#51 0x00007ffff7772f65 in QCoreApplication::exec() ()
   from /home/dlm/share/Qt5.4.1/5.4/gcc_64/lib/libQt5Core.so.5
#52 0x0000000000435dab in main (argc=1, argv=<optimized out>)
    at /home/dlm/share/sc-hjh.git/editors/sc-ide/core/main.cpp:128

@scztt scztt added this to the 3.7 milestone Apr 18, 2015

@scztt scztt self-assigned this Apr 18, 2015

@scztt scztt modified the milestone: 3.7 Apr 18, 2015

@scztt scztt closed this Apr 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment