[umbrello] [Bug 371990] New: Crash when removing pin widgets after owning component has been removed before

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Wed Nov 2 18:52:38 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=371990

            Bug ID: 371990
           Summary: Crash when removing pin widgets after owning component
                    has been removed before
           Product: umbrello
           Version: Git
          Platform: openSUSE RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: umbrello-devel at kde.org
          Reporter: clushkou at gmx.net
  Target Milestone: ---

GIT HEAD (commit 3409db0b671a61440cb7e89dd024adf961b21cee)
Crash when I
1) create new component diagram
2) create component
3) create two pins for the component
4) select component and remove it from diagram using Delete key
5) select pins and remove them from diagram using Delete key

Backtrace
#0  0x0000000000608123 in WidgetBase::id() const (this=0xf51c90) at
/home/umbrello/umbrello/src/umbrello/umlwidgets/widgetbase.cpp:171
#1  0x00000000005f5b3d in PinPortBase::saveToXMI(QDomDocument&, QDomElement&)
(this=0xefa390, qDoc=..., qElement=...)
    at /home/umbrello/umbrello/src/umbrello/umlwidgets/pinportbase.cpp:323
        element = {<QDomNode> = {impl = 0xc17f80}, <No data fields>}
#2  0x00000000005a48c4 in Uml::CmdRemoveWidget::CmdRemoveWidget(UMLWidget*)
(this=0xf1d130, widget=0xefa390)
    at /home/umbrello/umbrello/src/umbrello/cmds/widget/cmdremovewidget.cpp:33
        doc = {<QDomNode> = {impl = 0xf98850}, <No data fields>}
#3  0x0000000000476c11 in UMLScene::removeWidget(UMLWidget*)
(this=this at entry=0xeefb50, o=o at entry=0xefa390)
    at /home/umbrello/umbrello/src/umbrello/umlscene.cpp:1167
#4  0x000000000047afab in UMLScene::deleteSelection() (this=0xeefb50) at
/home/umbrello/umbrello/src/umbrello/umlscene.cpp:1401
        widget = 0xefa390
        _container_ = 
            {c = {{p = {static shared_null = {ref = {_q_value = 3408}, alloc =
0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0xde7840}, d =
0xde7840}}, brk = 0, i = {i = 0xde7858}, e = {i = 0xde7868}}
        selectionCount = 2
#5  0x000000000045082a in UMLApp::slotDeleteSelected() (this=0xba8670) at
/home/umbrello/umbrello/src/umbrello/uml.cpp:2994
        f = <optimized out>
        __PRETTY_FUNCTION__ = "void UMLApp::slotDeleteSelected()"
#6  0x00007ffff449c0ba in QMetaObject::activate(QObject*, QMetaObject const*,
int, void**) () at /usr/lib64/libQtCore.so.4
#7  0x00007ffff4c0d5b2 in QAction::triggered(bool) () at
/usr/lib64/libQtGui.so.4
#8  0x00007ffff4c0ef63 in QAction::activate(QAction::ActionEvent) () at
/usr/lib64/libQtGui.so.4
#9  0x00007ffff4c0f0bc in QAction::event(QEvent*) () at
/usr/lib64/libQtGui.so.4
#10 0x00007ffff640c33f in KAction::event(QEvent*) () at
/usr/lib64/libkdeui.so.5
#11 0x00007ffff4c136fc in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() at /usr/lib64/libQtGui.so.4
#12 0x00007ffff4c19c3d in QApplication::notify(QObject*, QEvent*) () at
/usr/lib64/libQtGui.so.4
#13 0x00007ffff64e1e9a in KApplication::notify(QObject*, QEvent*) () at
/usr/lib64/libkdeui.so.5
#14 0x00007ffff448814d in QCoreApplication::notifyInternal(QObject*, QEvent*)
() at /usr/lib64/libQtCore.so.4
#15 0x00007ffff4c44986 in  () at /usr/lib64/libQtGui.so.4
#16 0x00007ffff4c44abc in  () at /usr/lib64/libQtGui.so.4
#17 0x00007ffff4c1af73 in QApplication::notify(QObject*, QEvent*) () at
/usr/lib64/libQtGui.so.4
#18 0x00007ffff64e1e9a in KApplication::notify(QObject*, QEvent*) () at
/usr/lib64/libkdeui.so.5
#19 0x00007ffff448814d in QCoreApplication::notifyInternal(QObject*, QEvent*)
() at /usr/lib64/libQtCore.so.4
#20 0x00007ffff4cada57 in  () at /usr/lib64/libQtGui.so.4
#21 0x00007ffff4caddf9 in  () at /usr/lib64/libQtGui.so.4
#22 0x00007ffff4c89a0f in QApplication::x11ProcessEvent(_XEvent*) () at
/usr/lib64/libQtGui.so.4
#23 0x00007ffff4cb0552 in  () at /usr/lib64/libQtGui.so.4
#24 0x00007ffff0546c84 in g_main_context_dispatch () at
/usr/lib64/libglib-2.0.so.0
#25 0x00007ffff0546ed8 in  () at /usr/lib64/libglib-2.0.so.0
#26 0x00007ffff0546f7c in g_main_context_iteration () at
/usr/lib64/libglib-2.0.so.0
#27 0x00007ffff44b4f7e in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
at /usr/lib64/libQtCore.so.4
#28 0x00007ffff4cb0606 in  () at /usr/lib64/libQtGui.so.4
#29 0x00007ffff4486d0f in
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib64/libQtCore.so.4


Root cause seems to be that PinPortBase stores pointer to owner widget, but
does not get notified if owner gets removed from diagram. Please review and
apply attached patch that fixes the crash.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list