Bug 372601 - Umbrello crashes after undoing class attribute deletion
Summary: Umbrello crashes after undoing class attribute deletion
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.20.3 (KDE Applications 16.08.3)
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2016-11-17 22:02 UTC by Ralf Habacker
Modified: 2016-11-17 23:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.20.80 (KDE Applications 16.11.80)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2016-11-17 22:02:24 UTC
Application: umbrello (2.20.80-5be8168)
KDE Platform Version: 4.14.26
Qt Version: 4.8.6
Operating System: Linux 4.1.34-33-default x86_64
Distribution: "openSUSE Leap 42.1 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
1. Add a class to a diagram
2. Add an attribute
3. delete the attribute from the tree view
4. Undo the delete

The crash can be reproduced every time.

-- Backtrace:
Application: Umbrello UML-Modeller (umbrello), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f26604e97c0 (LWP 6015))]

Thread 4 (Thread 0x7f2642a3b700 (LWP 6018)):
#0  0x00007f265566fcf9 in g_mutex_lock () at /usr/lib64/libglib-2.0.so.0
#1  0x00007f265562d387 in g_main_context_prepare () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f265562dd80 in  () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f265562df7c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#4  0x00007f265a6c8f9e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#5  0x00007f265a69ad0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#6  0x00007f265a69b005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#7  0x00007f265a59849f in QThread::exec() () at /usr/lib64/libQtCore.so.4
#8  0x00007f265a59ab7f in  () at /usr/lib64/libQtCore.so.4
#9  0x00007f265e2280a4 in start_thread () at /lib64/libpthread.so.0
#10 0x00007f26599ba02d in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f26436b4700 (LWP 6017)):
#0  0x00007f265e22c03f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f265cfe8b3d in JSC::BlockAllocator::blockFreeingThreadMain() () at /usr/lib64/libQtWebKit.so.4
#2  0x00007f265d29da06 in WTF::wtfThreadEntryPoint(void*) () at /usr/lib64/libQtWebKit.so.4
#3  0x00007f265e2280a4 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f26599ba02d in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f2643fd5700 (LWP 6016)):
#0  0x00007f265e22c03f in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0
#1  0x00007f265d275eb6 in WTF::TCMalloc_PageHeap::scavengerThread() () at /usr/lib64/libQtWebKit.so.4
#2  0x00007f265d275ee9 in  () at /usr/lib64/libQtWebKit.so.4
#3  0x00007f265e2280a4 in start_thread () at /lib64/libpthread.so.0
#4  0x00007f26599ba02d in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f26604e97c0 (LWP 6015)):
[KCrash Handler]
#6  0x00007f265a2285a0 in __dynamic_cast () at /usr/lib64/libstdc++.so.6
#7  0x0000000000460428 in UMLDoc::addUMLObject(UMLObject*) (this=this@entry=0x2a36880, object=0x30fb380) at /home/ralf/src/umbrello-16.12/umbrello/umldoc.cpp:1126
#8  0x00000000005a58a5 in Uml::CmdRemoveUMLObject::undo() (this=0x30c4a10) at /home/ralf/src/umbrello-16.12/umbrello/cmds/generic/cmdremoveumlobject.cpp:55
#9  0x00007f265b556011 in QUndoStack::undo() () at /usr/lib64/libQtGui.so.4
#10 0x00007f265a6b00ba in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /usr/lib64/libQtCore.so.4
#11 0x00007f265af205b2 in QAction::triggered(bool) () at /usr/lib64/libQtGui.so.4
#12 0x00007f265af21f63 in QAction::activate(QAction::ActionEvent) () at /usr/lib64/libQtGui.so.4
#13 0x00007f265af220bc in QAction::event(QEvent*) () at /usr/lib64/libQtGui.so.4
#14 0x00007f265af266fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#15 0x00007f265af2cc3d in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#16 0x00007f265ed8ee9a in KApplication::notify(QObject*, QEvent*) () at /usr/lib64/libkdeui.so.5
#17 0x00007f265a69c14d in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQtCore.so.4
#18 0x00007f265af57986 in  () at /usr/lib64/libQtGui.so.4
#19 0x00007f265af57abc in  () at /usr/lib64/libQtGui.so.4
#20 0x00007f265af2df73 in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#21 0x00007f265ed8ee9a in KApplication::notify(QObject*, QEvent*) () at /usr/lib64/libkdeui.so.5
#22 0x00007f265a69c14d in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQtCore.so.4
#23 0x00007f265afc0a57 in  () at /usr/lib64/libQtGui.so.4
#24 0x00007f265afc0df9 in  () at /usr/lib64/libQtGui.so.4
#25 0x00007f265af9ca0f in QApplication::x11ProcessEvent(_XEvent*) () at /usr/lib64/libQtGui.so.4
#26 0x00007f265afc3552 in  () at /usr/lib64/libQtGui.so.4
#27 0x00007f265562dc84 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#28 0x00007f265562ded8 in  () at /usr/lib64/libglib-2.0.so.0
#29 0x00007f265562df7c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#30 0x00007f265a6c8f7e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#31 0x00007f265afc3606 in  () at /usr/lib64/libQtGui.so.4
#32 0x00007f265a69ad0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#33 0x00007f265a69b005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#34 0x00007f265a6a0459 in QCoreApplication::exec() () at /usr/lib64/libQtCore.so.4
#35 0x000000000043ec65 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/ralf/src/umbrello-16.12/umbrello/main.cpp:246

Reported using DrKonqi
Comment 1 Ralf Habacker 2016-11-17 23:17:14 UTC
Git commit b391fe5d6c004080e4e68c5bafadf74b778f559b by Ralf Habacker.
Committed on 17/11/2016 at 23:14.
Pushed by habacker into branch 'Applications/16.12'.

Fix 'Umbrello crashes after undoing class attribute deletion'.

UMLClassifierListItem objects were not be added to the parent
on undo.

Also keep handling of UMLAttribute instances in sync with
UMLOperation and UMLTemplate which are only removed from the
parent classifier and not deleted.
FIXED-IN:2.20.80 (KDE Applications 16.11.80)

M  +9    -4    umbrello/umldoc.cpp
M  +2    -4    umbrello/umlmodel/classifier.cpp
M  +1    -1    umbrello/umlmodel/umlcanvasobject.h

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