Bug 89860 - crash in a class diagram when selecting an association (or trying to delete it)
Summary: crash in a class diagram when selecting an association (or trying to delete it)
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-20 08:34 UTC by Pekka Jääskeläinen
Modified: 2004-10-12 22:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
test case, try selecting the association, right clicking on it and then clicking on something else, or just pressing del when it's selected (382.26 KB, text/x-xmi)
2004-09-20 08:36 UTC, Pekka Jääskeläinen
Details
Patch to avoid crashing in this case. (664 bytes, patch)
2004-09-21 22:39 UTC, Pekka Jääskeläinen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pekka Jääskeläinen 2004-09-20 08:34:58 UTC
Version:           CVS HEAD (using KDE KDE 3.3.0)
Installed from:    Debian testing/unstable Packages
Compiler:          g++ (GCC) 3.3.4 (Debian 1:3.3.4-11) 
OS:                Linux

When I select association and right-click or press delete with it, Umbrello crashes. I created a simple test case from the diagram where the problem occurs. This is not the same association
deletion crash bug I sent a patch for last night, it's a different beast I noted even earlier.

KDE Crash Handler backtrace:
---
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 8349)]
[KCrash handler]
#5  0x40ca8e9a in QObject::blockSignals () from /usr/lib/libqt-mt.so.3
#6  0x08111a87 in AssociationWidget::mergeUMLRepresentationIntoAssociationData
    (this=0x8861700) at associationwidget.cpp:1113
#7  0x08119ebb in AssociationWidget::qt_invoke (this=0x8861700, _id=5, 
    _o=0xbfffebf0) at associationwidget.moc:94
#8  0x40cab4a6 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#9  0x40cab354 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#10 0x081a10d4 in UMLObject::modified (this=0x87edf00) at umlobject.moc:96
#11 0x0819ea06 in UMLObject::setDoc (this=0x87edf00, d=) at umlobject.cpp:205
#12 0x0810f370 in AssociationWidget::setDoc (this=0x8861700, doc=
      {static null = {static null = <same as static member of an already seen type>, d = 0x8313cc0, static shared_null = 0x8313cc0}, d = 0x8a84430, static shared_null = 0x8313cc0}) at associationwidget.cpp:382
#13 0x0813eab9 in DocWindow::updateDocumentation (this=0x841fd48, clear=true, 
    startup=false) at docwindow.cpp:106
#14 0x081abcb7 in UMLView::updateDocumentation (this=0x880db78, clear=true)
    at umlview.cpp:2187
#15 0x08117114 in AssociationWidget::setSelected (this=0x8861700, 
    _select=false) at associationwidget.cpp:2587
#16 0x081171df in AssociationWidget::slotClearAllSelected (this=0x8861700)
    at associationwidget.cpp:2604
#17 0x08119eae in AssociationWidget::qt_invoke (this=0x8861700, _id=4, 
    _o=0xbfffedb0) at associationwidget.moc:93
#18 0x40cab4a6 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#19 0x40cab354 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#20 0x081b2a03 in UMLView::sigClearAllSelected (this=0x880db78)
    at umlview.moc:180
#21 0x081a62b1 in UMLView::clearSelected (this=0x880db78) at umlview.cpp:914
#22 0x081a6be0 in UMLView::selectWidgets (this=0x880db78, px=0, py=0, qx=0, 
    qy=0) at umlview.cpp:1139
#23 0x08170d7c in ToolBarStateArrow::mousePress (this=0x8852508, 
    ome=0xbfffef70) at toolbarstatearrow.cpp:45
#24 0x081a6a37 in UMLView::contentsMousePressEvent (this=0x880db78, 
    ome=0xbfffef70) at umlview.cpp:1111
#25 0x40dc0e42 in QScrollView::viewportMousePressEvent ()
   from /usr/lib/libqt-mt.so.3
#26 0x40dc07a5 in QScrollView::eventFilter () from /usr/lib/libqt-mt.so.3
#27 0x40ca8e5e in QObject::activate_filters () from /usr/lib/libqt-mt.so.3
#28 0x40ca8d8c in QObject::event () from /usr/lib/libqt-mt.so.3
#29 0x40ce160f in QWidget::event () from /usr/lib/libqt-mt.so.3
#30 0x40c4ebcf in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#31 0x40c4e2c4 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#32 0x407def13 in KApplication::notify () from /usr/lib/libkdecore.so.4
#33 0x40be3640 in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#34 0x40be12ce in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#35 0x40bf81a4 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#36 0x40c60f28 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#37 0x40c60dd8 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#38 0x40c4ee21 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#39 0x08159c71 in main (argc=7, argv=0xbffffbc4) at main.cpp:86
Comment 1 Pekka Jääskeläinen 2004-09-20 08:36:37 UTC
Created attachment 7589 [details]
test case, try selecting the association, right clicking on it and then clicking on something else, or just pressing del when it's selected
Comment 2 Pekka Jääskeläinen 2004-09-21 22:39:54 UTC
Created attachment 7621 [details]
Patch to avoid crashing in this case.

I don't know the reason for the NULL pointer. The real bug is deeper in the 
call chain, this patch just avoids the crash from happening. I have no idea
what the function this crash happens in is supposed to do.
Comment 3 Oliver Kellogg 2004-09-22 06:55:52 UTC
Pekka -
Many thanks for the patch.
Independently, I made a another change that also
stops the crash (see umlview.cpp rev. 1.178) but
a detailed analysis is still to be done.
Comment 4 Pekka Jääskeläinen 2004-09-22 07:29:21 UTC
Unfortunately your change does not seem to fix the problem completely. It doesn't crash anymore when selecting the association (or even when pressing delete), but when you after selecting the association click on the canvas it still crashes. 

My patch seems to avoid the crash, but on my home machine I had another instability problem with this test case diagram which I cannot reproduce with this machine at work (at least not anymore after your change), so this might also be an environment dependent crash. On the other hand, I should have almost exactly identical environments (same distro, same compiler) in both computers, only the CPU differs (Athlon vs. P4) which I doubt should make a difference in this case.
Comment 5 Jonathan Riddell 2004-10-12 22:47:06 UTC
I can no longer recreate this problem with current CVS.

Please reopen this if it still a problem.