Bug 349259

Summary: Crash on opening second xmi file
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: crash Keywords: drkonqi
Priority: NOR    
Version: 2.16.2 (KDE Applications 15.04.2)   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 2.16.3 (KDE Applications 15.04.3)
Sentry Crash Report:
Attachments: First xmi file
Second xmi file

Description Ralf Habacker 2015-06-16 21:57:12 UTC
Application: umbrello (2.16.3-33f5d1d)
KDE Platform Version: 4.14.9
Qt Version: 4.8.7
Operating System: Linux 3.11.10-29-desktop x86_64
Distribution: "openSUSE 13.1 (Bottle) (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
I opened a xmi file, then after choosing another file to load umbrello crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: Umbrello UML Modeller (umbrello), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#6  0x00007fd2638944c9 in raise () from /lib64/libc.so.6
#7  0x00007fd263895958 in abort () from /lib64/libc.so.6
#8  0x00007fd2646c4564 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>) at global/qglobal.cpp:2423
#9  0x00007fd2646c46e9 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x7fd264832658 "ASSERT: \"%s\" in file %s, line %d", ap=ap@entry=0x7ffeef2a0878) at global/qglobal.cpp:2469
#10 0x00007fd2646c4ef4 in qFatal (msg=msg@entry=0x7fd264832658 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2652
#11 0x00007fd2646c4f3a in qt_assert (assertion=assertion@entry=0x6d8960 "umlView", file=file@entry=0x6d8978 "/home/ralf/src/umbrello-15.04/umbrello/cmds/widget/cmd_baseWidgetCommand.cpp", line=line@entry=47) at global/qglobal.cpp:2118
#12 0x00000000005a615d in Uml::CmdBaseWidgetCommand::scene (this=this@entry=0x6bdd920) at /home/ralf/src/umbrello-15.04/umbrello/cmds/widget/cmd_baseWidgetCommand.cpp:47
#13 0x00000000005a668e in Uml::CmdRemoveWidget::redo (this=0x6bdd920) at /home/ralf/src/umbrello-15.04/umbrello/cmds/widget/cmd_removeWidget.cpp:48
#14 0x0000000000639871 in UMLApp::executeCommand (this=0x16fce40, cmd=0x6bdd920) at /home/ralf/src/umbrello-15.04/umbrello/uml.cpp:3297
#15 0x0000000000663aa7 in UMLScene::removeWidget (this=this@entry=0x6bdd1d0, o=o@entry=0x6be0520) at /home/ralf/src/umbrello-15.04/umbrello/umlscene.cpp:1159
#16 0x0000000000667a84 in UMLScene::checkMessages (this=this@entry=0x6bdd1d0, w=0x6bde600) at /home/ralf/src/umbrello-15.04/umbrello/umlscene.cpp:1017
#17 0x000000000066934d in UMLScene::removeWidgetCmd (this=this@entry=0x6bdd1d0, o=o@entry=0x6bde600) at /home/ralf/src/umbrello-15.04/umbrello/umlscene.cpp:1178
#18 0x00000000006693fb in UMLScene::removeAllWidgets (this=this@entry=0x6bdd1d0) at /home/ralf/src/umbrello-15.04/umbrello/umlscene.cpp:2112
#19 0x00000000006694b9 in UMLScene::~UMLScene (this=0x6bdd1d0, __in_chrg=<optimized out>) at /home/ralf/src/umbrello-15.04/umbrello/umlscene.cpp:180
#20 0x0000000000669569 in UMLScene::~UMLScene (this=0x6bdd1d0, __in_chrg=<optimized out>) at /home/ralf/src/umbrello-15.04/umbrello/umlscene.cpp:186
#21 0x0000000000671a36 in UMLView::~UMLView (this=0x6af0250, __in_chrg=<optimized out>) at /home/ralf/src/umbrello-15.04/umbrello/umlview.cpp:48
#22 0x0000000000671a59 in UMLView::~UMLView (this=0x6af0250, __in_chrg=<optimized out>) at /home/ralf/src/umbrello-15.04/umbrello/umlview.cpp:49
#23 0x000000000060a6ba in UMLFolder::removeView (this=<optimized out>, view=view@entry=0x6af0250) at /home/ralf/src/umbrello-15.04/umbrello/folder.cpp:97
#24 0x0000000000648b5b in UMLDoc::removeView (this=0x18c1350, view=view@entry=0x6af0250, enforceCurrentView=enforceCurrentView@entry=false) at /home/ralf/src/umbrello-15.04/umbrello/umldoc.cpp:233
#25 0x000000000060b40a in UMLFolder::removeAllViews (this=0x1963a90) at /home/ralf/src/umbrello-15.04/umbrello/folder.cpp:237
#26 0x0000000000645aa9 in UMLDoc::removeAllViews (this=this@entry=0x18c1350) at /home/ralf/src/umbrello-15.04/umbrello/umldoc.cpp:2543
#27 0x0000000000645b7b in UMLDoc::closeDocument (this=this@entry=0x18c1350) at /home/ralf/src/umbrello-15.04/umbrello/umldoc.cpp:356
#28 0x000000000064e897 in UMLDoc::openDocument (this=0x18c1350, url=..., format=format@entry=0x0) at /home/ralf/src/umbrello-15.04/umbrello/umldoc.cpp:427
#29 0x0000000000639239 in UMLApp::slotFileOpenRecent (this=0x16fce40, url=...) at /home/ralf/src/umbrello-15.04/umbrello/uml.cpp:1256
#30 0x00007fd2647e4dd8 in QMetaObject::activate (sender=sender@entry=0x19525b0, m=m@entry=0x7fd2667d4fe0 <KRecentFilesAction::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffeef2a0f70) at kernel/qobject.cpp:3576
#31 0x00007fd266309782 in KRecentFilesAction::urlSelected (this=this@entry=0x19525b0, _t1=...) at /usr/src/debug/kdelibs-4.14.9/build/kdeui/krecentfilesaction.moc:137
#32 0x00007fd266309848 in KRecentFilesActionPrivate::_k_urlSelected (this=<optimized out>, action=0x4470610) at /usr/src/debug/kdelibs-4.14.9/kdeui/actions/krecentfilesaction.cpp:98
#33 0x00007fd2647e4dd8 in QMetaObject::activate (sender=sender@entry=0x19525b0, m=m@entry=0x7fd2667d50e0 <KSelectAction::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffeef2a1150) at kernel/qobject.cpp:3576
#34 0x00007fd26630cfaf in KSelectAction::triggered (this=this@entry=0x19525b0, _t1=0x4470610) at /usr/src/debug/kdelibs-4.14.9/build/kdeui/kselectaction.moc:188
#35 0x00007fd26630d380 in KSelectAction::actionTriggered (this=0x19525b0, action=0x4470610) at /usr/src/debug/kdelibs-4.14.9/kdeui/actions/kselectaction.cpp:321
#36 0x00007fd2647e4dd8 in QMetaObject::activate (sender=sender@entry=0x195b0d0, m=m@entry=0x7fd266162fc0 <QActionGroup::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffeef2a12e0) at kernel/qobject.cpp:3576
#37 0x00007fd2656b4b8f in QActionGroup::triggered (this=this@entry=0x195b0d0, _t1=_t1@entry=0x4470610) at .moc/release-shared/moc_qactiongroup.cpp:159
#38 0x00007fd2656b4c0f in QActionGroupPrivate::_q_actionTriggered (this=<optimized out>) at kernel/qactiongroup.cpp:93
#39 0x00007fd2647e4dd8 in QMetaObject::activate (sender=sender@entry=0x4470610, m=m@entry=0x7fd266162e80 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffeef2a1430) at kernel/qobject.cpp:3576
#40 0x00007fd2656b1c42 in QAction::triggered (this=this@entry=0x4470610, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#41 0x00007fd2656b3613 in QAction::activate (this=this@entry=0x4470610, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#42 0x00007fd265ae11c9 in QMenuPrivate::activateCausedStack (this=this@entry=0x1955b40, causedStack=..., action=action@entry=0x4470610, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1037
#43 0x00007fd265ae5719 in QMenuPrivate::activateAction (this=0x1955b40, action=0x4470610, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1129
#44 0x00007fd265ae90f5 in QMenu::mouseReleaseEvent (this=this@entry=0x195bc40, e=e@entry=0x7ffeef2a1b60) at widgets/qmenu.cpp:2371
#45 0x00007fd26648efc5 in KMenu::mouseReleaseEvent (this=0x195bc40, e=0x7ffeef2a1b60) at /usr/src/debug/kdelibs-4.14.9/kdeui/widgets/kmenu.cpp:464
#46 0x00007fd26570a44e in QWidget::event (this=this@entry=0x195bc40, event=event@entry=0x7ffeef2a1b60) at kernel/qwidget.cpp:8389
#47 0x00007fd265ae958b in QMenu::event (this=0x195bc40, e=0x7ffeef2a1b60) at widgets/qmenu.cpp:2480
#48 0x00007fd2656b7d9c in QApplicationPrivate::notify_helper (this=this@entry=0x153e480, receiver=receiver@entry=0x195bc40, e=e@entry=0x7ffeef2a1b60) at kernel/qapplication.cpp:4565
#49 0x00007fd2656be45a in QApplication::notify (this=this@entry=0x7ffeef2a2370, receiver=receiver@entry=0x195bc40, e=e@entry=0x7ffeef2a1b60) at kernel/qapplication.cpp:4108
#50 0x00007fd2663d87ca in KApplication::notify (this=0x7ffeef2a2370, receiver=0x195bc40, event=0x7ffeef2a1b60) at /usr/src/debug/kdelibs-4.14.9/kdeui/kernel/kapplication.cpp:311
#51 0x00007fd2647d0e6d in QCoreApplication::notifyInternal (this=0x7ffeef2a2370, receiver=receiver@entry=0x195bc40, event=event@entry=0x7ffeef2a1b60) at kernel/qcoreapplication.cpp:955
#52 0x00007fd2656bdc53 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#53 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x195bc40, event=event@entry=0x7ffeef2a1b60, alienWidget=alienWidget@entry=0x0, nativeWidget=nativeWidget@entry=0x195bc40, buttonDown=buttonDown@entry=0x7fd26619f2e8 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3173
#54 0x00007fd2657328fc in QETWidget::translateMouseEvent (this=this@entry=0x195bc40, event=event@entry=0x7ffeef2a1ea0) at kernel/qapplication_x11.cpp:4470
#55 0x00007fd26573103c in QApplication::x11ProcessEvent (this=0x7ffeef2a2370, event=event@entry=0x7ffeef2a1ea0) at kernel/qapplication_x11.cpp:3653
#56 0x00007fd265757ef2 in x11EventSourceDispatch (s=0x152d5e0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#57 0x00007fd2603bd316 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#58 0x00007fd2603bd668 in ?? () from /usr/lib64/libglib-2.0.so.0
#59 0x00007fd2603bd70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#60 0x00007fd2647fdd6e in QEventDispatcherGlib::processEvents (this=0x14e7af0, flags=...) at kernel/qeventdispatcher_glib.cpp:452
#61 0x00007fd265757fa6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#62 0x00007fd2647cfa3f in QEventLoop::processEvents (this=this@entry=0x7ffeef2a2280, flags=...) at kernel/qeventloop.cpp:149
#63 0x00007fd2647cfd35 in QEventLoop::exec (this=this@entry=0x7ffeef2a2280, flags=...) at kernel/qeventloop.cpp:204
#64 0x00007fd2647d51bb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1227
#65 0x00007fd2656b655c in QApplication::exec () at kernel/qapplication.cpp:3823
#66 0x0000000000443616 in main (argc=<optimized out>, argv=<optimized out>) at /home/ralf/src/umbrello-15.04/umbrello/main.cpp:124

Reported using DrKonqi
Comment 1 Ralf Habacker 2015-06-16 21:58:27 UTC
Created attachment 93203 [details]
First xmi file
Comment 2 Ralf Habacker 2015-06-16 21:59:22 UTC
Created attachment 93204 [details]
Second xmi file
Comment 3 Ralf Habacker 2015-06-16 22:06:08 UTC
#14 UMLApp::executeCommand (..) at /home/ralf/src/umbrello-15.04/umbrello/uml.cpp:3297
#15  UMLScene::removeWidget(..) at /home/ralf/src/umbrello-15.04/umbrello/umlscene.cpp:1159 
#16 UMLScene::checkMessages(..) at /home/ralf/src/umbrello-15.04/umbrello/umlscene.cpp:1017
#17 UMLScene::removeWidgetCmd (...) at /home/ralf/src/umbrello-15.04/umbrello/umlscene.cpp:1178
...
#26 UMLDoc::removeAllViews (...) at /home/ralf/src/umbrello-15.04/umbrello/umldoc.cpp:2543
#27 UMLDoc::closeDocument (...) at /home/ralf/src/umbrello-15.04/umbrello/umldoc.cpp:356

The problem here is that on document close (#27)  checkMessages (#16) runs ::removeWidget() (#15), which triggers an undo command execution, which asserts on a not found UMLView instance.
Comment 4 Ralf Habacker 2015-06-16 22:09:50 UTC
Git commit 849f7a41efdc624b3096b1d7232d61a0ca7cada7 by Ralf Habacker.
Committed on 16/06/2015 at 22:09.
Pushed by habacker into branch 'Applications/15.04'.

Fix 'Crash on opening second xmi file'.
FIXED-IN:2.16.3 (KDE Applications 15.04.3)

M  +1    -1    umbrello/umlscene.cpp

http://commits.kde.org/umbrello/849f7a41efdc624b3096b1d7232d61a0ca7cada7