Bug 300004 - Umbrello crashes while loading XMI file.
Summary: Umbrello crashes while loading XMI file.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.8.3
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-14 14:11 UTC by Anthony Parent
Modified: 2014-06-16 20:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Parent 2012-05-14 14:11:44 UTC
Application: umbrello (2.8.3)
KDE Platform Version: 4.8.3 (4.8.3)
Qt Version: 4.8.1
Operating System: Linux 3.3.4-4.fc17.x86_64 x86_64
Distribution: "Fedora release 17 (Beefy Miracle)"

-- Information about the crash:
- What I was doing when the application crashed:
Loading a generated XMI file. (FIle was generated as per a previous umbrello version. Granted the file may not be 100% correct, but the application should not crash...)

-- Backtrace:
Application: Umbrello UML Modeller (umbrello), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7ff392baa880 (LWP 27703))]

Thread 2 (Thread 0x7ff3856f7700 (LWP 27718)):
#0  __libc_enable_asynccancel () at ../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:61
#1  0x0000003873ae8e86 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:85
#2  0x0000003876247984 in g_main_context_poll (n_fds=1, fds=0x7ff380002bb0, timeout=-1, context=0x7ff3800009a0, priority=<optimized out>) at gmain.c:3417
#3  g_main_context_iterate (context=context@entry=0x7ff3800009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at gmain.c:3118
#4  0x0000003876247aa4 in g_main_context_iteration (context=0x7ff3800009a0, may_block=1) at gmain.c:3184
#5  0x000000387ffa3a06 in QEventDispatcherGlib::processEvents (this=0x7ff3800008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x000000387ff7495f in QEventLoop::processEvents (this=this@entry=0x7ff3856f6cf0, flags=...) at kernel/qeventloop.cpp:149
#7  0x000000387ff74be8 in QEventLoop::exec (this=0x7ff3856f6cf0, flags=...) at kernel/qeventloop.cpp:204
#8  0x000000387fe785a0 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#9  0x000000387ff553df in QInotifyFileSystemWatcherEngine::run (this=0x26c8610) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x000000387fe7b53b in QThreadPrivate::start (arg=0x26c8610) at thread/qthread_unix.cpp:298
#11 0x0000003873e07d14 in start_thread (arg=0x7ff3856f7700) at pthread_create.c:309
#12 0x0000003873af194d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7ff392baa880 (LWP 27703)):
[KCrash Handler]
#6  0x0000000000abf450 in ?? ()
#7  0x00000000006a5f10 in UMLAssociation::getObjectId (this=<optimized out>, role=Uml::A) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/association.cpp:500
#8  0x00000000006fe5f7 in UMLPackage::addAssocToConcepts (this=0x26df9f0, assoc=0x3b3f7c0) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/package.cpp:84
#9  0x00000000006a7830 in resolveRef (this=0x3b3f7c0) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/association.cpp:146
#10 UMLAssociation::resolveRef (this=0x3b3f7c0) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/association.cpp:135
#11 0x00000000006fe532 in UMLPackage::resolveRef (this=0x26df9f0) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/package.cpp:423
#12 0x000000000072927f in UMLDoc::resolveTypes (this=0x257ac30) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/umldoc.cpp:2062
#13 0x00000000007298ee in UMLDoc::loadExtensionsFromXMI (this=this@entry=0x257ac30, node=...) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/umldoc.cpp:2298
#14 0x0000000000734663 in UMLDoc::loadFromXMI (this=0x257ac30, file=..., encode=<optimized out>) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/umldoc.cpp:1915
#15 0x000000000072fcbc in UMLDoc::openDocument (this=0x257ac30, url=..., format=<optimized out>) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/umldoc.cpp:544
#16 0x000000000071ee6b in UMLApp::slotFileOpen (this=0x256e990) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/uml.cpp:1140
#17 0x000000387ff8c09f in QMetaObject::activate (sender=0x27042f0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff62e16730) at kernel/qobject.cpp:3547
#18 0x0000003881bc42a2 in QAction::triggered (this=this@entry=0x27042f0, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#19 0x0000003881bc4490 in QAction::activate (this=0x27042f0, event=<optimized out>) at kernel/qaction.cpp:1257
#20 0x0000003881ffd063 in QMenuPrivate::activateCausedStack (this=this@entry=0x2674080, causedStack=..., action=action@entry=0x27042f0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1028
#21 0x0000003882003379 in QMenuPrivate::activateAction (this=0x2674080, action=0x27042f0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1120
#22 0x0000003883afed70 in KMenu::mouseReleaseEvent (this=0x2673f80, e=0x7fff62e172d0) at /usr/src/debug/kdelibs-4.8.3/kdeui/widgets/kmenu.cpp:464
#23 0x0000003881c19d00 in QWidget::event (this=0x2673f80, event=0x7fff62e172d0) at kernel/qwidget.cpp:8362
#24 0x000000388200462b in QMenu::event (this=0x2673f80, e=0x7fff62e172d0) at widgets/qmenu.cpp:2469
#25 0x0000003881bca47c in QApplicationPrivate::notify_helper (this=this@entry=0x2461210, receiver=receiver@entry=0x2673f80, e=e@entry=0x7fff62e172d0) at kernel/qapplication.cpp:4554
#26 0x0000003881bcf20b in QApplication::notify (this=<optimized out>, receiver=0x2673f80, e=0x7fff62e172d0) at kernel/qapplication.cpp:4097
#27 0x0000003883a45a56 in KApplication::notify (this=0x7fff62e180d0, receiver=0x2673f80, event=0x7fff62e172d0) at /usr/src/debug/kdelibs-4.8.3/kdeui/kernel/kapplication.cpp:311
#28 0x000000387ff7595e in QCoreApplication::notifyInternal (this=0x7fff62e180d0, receiver=0x2673f80, event=0x7fff62e172d0) at kernel/qcoreapplication.cpp:876
#29 0x0000003881bcb2bb in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#30 QApplicationPrivate::sendMouseEvent (receiver=0x2673f80, event=0x7fff62e172d0, alienWidget=0x0, nativeWidget=0x2673f80, buttonDown=0x388269dd88, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3165
#31 0x0000003881c4585c in QETWidget::translateMouseEvent (this=this@entry=0x2673f80, event=event@entry=0x7fff62e17a40) at kernel/qapplication_x11.cpp:4457
#32 0x0000003881c44721 in QApplication::x11ProcessEvent (this=0x7fff62e180d0, event=0x7fff62e17a40) at kernel/qapplication_x11.cpp:3646
#33 0x0000003881c6a73c in x11EventSourceDispatch (s=s@entry=0x2466b70, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#34 0x00000038762475cc in g_main_dispatch (context=0x2460fd0) at gmain.c:2515
#35 g_main_context_dispatch (context=context@entry=0x2460fd0) at gmain.c:3052
#36 0x00000038762479e8 in g_main_context_iterate (context=context@entry=0x2460fd0, block=block@entry=1, dispatch=dispatch@entry=1, self=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at gmain.c:3123
#37 0x0000003876247aa4 in g_main_context_iteration (context=0x2460fd0, may_block=1) at gmain.c:3184
#38 0x000000387ffa39e6 in QEventDispatcherGlib::processEvents (this=0x2434530, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#39 0x0000003881c6a41e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#40 0x000000387ff7495f in QEventLoop::processEvents (this=this@entry=0x7fff62e17e10, flags=...) at kernel/qeventloop.cpp:149
#41 0x000000387ff74be8 in QEventLoop::exec (this=0x7fff62e17e10, flags=...) at kernel/qeventloop.cpp:204
#42 0x000000387ff79718 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#43 0x00000000004358bb in main (argc=1, argv=0x7fff62e18228) at /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/main.cpp:111

Reported using DrKonqi
Comment 1 Oliver Kellogg 2012-05-21 18:21:50 UTC
(In reply to comment #0)
> [...]
> - What I was doing when the application crashed:
> Loading a generated XMI file. (FIle was generated as per a previous umbrello
> version. Granted the file may not be 100% correct, but the application
> should not crash...)

Totally agree.
Hard to tell what's happening just from the backtrace (in particular because of values optimized out.)
Could you attach the XMI file (or a stripped down version thereof) that causes the crash?
Comment 2 Ralf Habacker 2014-05-26 20:24:31 UTC
no response after 2 years
Comment 3 Oliver Kellogg 2014-06-07 05:50:21 UTC
Git commit dbd78fa7cc80765da48e2d20de27986d692c8e75 by Oliver Kellogg.
Committed on 07/06/2014 at 05:48.
Pushed by okellogg into branch 'master'.

(In reply to comment #0)
> -- Backtrace:
> Application: Umbrello UML Modeller (umbrello), signal: Segmentation fault
> [...]
> Thread 1 (Thread 0x7ff392baa880 (LWP 27703)):
> [KCrash Handler]
> #6  0x0000000000abf450 in ?? ()
> #7  0x00000000006a5f10 in UMLAssociation::getObjectId (this=<optimized out>,
> role=Uml::A) at
> /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/association.cpp:500

I suspect the <UML:Association> was somehow inconsistent in the XMI so that
the role objects (UMLAssociation::m_pRole) did not get constructed.
As said, without a reproducer it's hard to tell.

umbrello/association.cpp
- Do not dereference m_pRole[role] when NULL.
  Might happen on loading corrupted XMI.

M  +2    -0    umbrello/association.cpp

http://commits.kde.org/umbrello/dbd78fa7cc80765da48e2d20de27986d692c8e75
Comment 4 Anthony Parent 2014-06-07 11:18:40 UTC
It was two years ago that I reported this issue. At the time, I couldn't add the XMI file because of company proprietary info.  I gave up long ago and moved on.
Comment 5 Oliver Kellogg 2014-06-16 20:10:23 UTC
Git commit afa2b621fad60ee7b7d981830841f697763eb550 by Oliver Kellogg.
Committed on 07/06/2014 at 05:48.
Pushed by okellogg into branch 'KDE/4.13'.

(In reply to comment #0)
> -- Backtrace:
> Application: Umbrello UML Modeller (umbrello), signal: Segmentation fault
> [...]
> Thread 1 (Thread 0x7ff392baa880 (LWP 27703)):
> [KCrash Handler]
> #6  0x0000000000abf450 in ?? ()
> #7  0x00000000006a5f10 in UMLAssociation::getObjectId (this=<optimized out>,
> role=Uml::A) at
> /usr/src/debug/kdesdk-4.8.3/umbrello/umbrello/association.cpp:500

I suspect the <UML:Association> was somehow inconsistent in the XMI so that
the role objects (UMLAssociation::m_pRole) did not get constructed.
As said, without a reproducer it's hard to tell.

umbrello/association.cpp
- Do not dereference m_pRole[role] when NULL.
  Might happen on loading corrupted XMI.

M  +2    -0    umbrello/association.cpp

http://commits.kde.org/umbrello/afa2b621fad60ee7b7d981830841f697763eb550