Bug 322541 - foreign key -
Summary: foreign key -
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.10.4
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Joris Steyn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-18 18:03 UTC by ivan
Modified: 2013-11-27 19:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2013-07-18 18:03:17 UTC
Application: umbrello (2.10.4)
KDE Platform Version: 4.10.4
Qt Version: 4.8.4
Operating System: Linux 3.8.0-26-generic x86_64
Distribution: Ubuntu 13.04

-- Information about the crash:
- What I was doing when the application crashed:

umbrello(15238): Not adding (id= "kShRaP2SC9wg" /type= "wt_Text" /name= "mswim_acquisition_vehicle_fkey" ) because it is already there

But in my .xmi don't have this key mswim_acquisition_vehicle_fkey.

The crash can be reproduced every time.

-- Backtrace:
Application: Modelador de UML Umbrello (umbrello), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f2165d977c0 (LWP 15238))]

Thread 3 (Thread 0x7f2152b48700 (LWP 15240)):
#0  0x00007f215f09835c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f215f0985b9 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f215f0590d5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f215f0596ba in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f2158f3e4f6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#5  0x00007f215f07ceb5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f2161fb8f8e in start_thread (arg=0x7f2152b48700) at pthread_create.c:311
#7  0x00007f21622c7e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7f2143fff700 (LWP 15241)):
#0  0x00007f21622bb3cd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f215f0591dc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f215f059304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f2163c08036 in QEventDispatcherGlib::processEvents (this=0x7f213c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f2163bd838f in QEventLoop::processEvents (this=this@entry=0x7f2143ffed90, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f2163bd8618 in QEventLoop::exec (this=this@entry=0x7f2143ffed90, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f2163ada410 in QThread::exec (this=this@entry=0x1382740) at thread/qthread.cpp:542
#7  0x00007f2163bb9edf in QInotifyFileSystemWatcherEngine::run (this=0x1382740) at io/qfilesystemwatcher_inotify.cpp:256
#8  0x00007f2163adcbec in QThreadPrivate::start (arg=0x1382740) at thread/qthread_unix.cpp:338
#9  0x00007f2161fb8f8e in start_thread (arg=0x7f2143fff700) at pthread_create.c:311
#10 0x00007f21622c7e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f2165d977c0 (LWP 15238)):
[KCrash Handler]
#6  deref (this=0x0) at ../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:133
#7  QString::operator= (this=0x23e4728, other=...) at tools/qstring.cpp:1411
#8  0x000000000076e049 in UMLObject::setDoc (this=<optimized out>, d=...) at ../../../umbrello/umbrello/umlobject.cpp:368
#9  0x0000000000460602 in ClassifierListPage::slotActivateItem (this=this@entry=0x23fa3e0, item=0x2442af0) at ../../../umbrello/umbrello/dialogs/classifierlistpage.cpp:319
#10 0x0000000000460a5b in ClassifierListPage::slotListItemCreated (this=0x23fa3e0, object=0x15f9f60) at ../../../umbrello/umbrello/dialogs/classifierlistpage.cpp:401
#11 0x00007f2163bee0ef in QMetaObject::activate (sender=0x135a660, m=m@entry=0x810d40 <UMLDoc::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x7fff77140cd0) at kernel/qobject.cpp:3539
#12 0x0000000000740750 in UMLDoc::sigObjectCreated (this=<optimized out>, _t1=_t1@entry=0x15f9f60) at ./umldoc.moc:167
#13 0x0000000000740765 in UMLDoc::signalUMLObjectCreated (this=<optimized out>, o=o@entry=0x15f9f60) at ../../../umbrello/umbrello/umldoc.cpp:1618
#14 0x00000000006e337c in UMLEntity::createForeignKeyConstraint (this=0x186a1e0, name=...) at ../../../umbrello/umbrello/entity.cpp:244
#15 0x000000000070e196 in Object_Factory::createChildObject (parent=0x186a1e0, type=UMLObject::ot_ForeignKeyConstraint) at ../../../umbrello/umbrello/object_factory.cpp:288
#16 0x00000000004603c2 in ClassifierListPage::slotNewListItem (this=this@entry=0x23fa3e0) at ../../../umbrello/umbrello/dialogs/classifierlistpage.cpp:735
#17 0x0000000000462623 in ConstraintListPage::slotNewForeignKeyConstraint (this=0x23fa3e0) at ../../../umbrello/umbrello/dialogs/constraintlistpage.cpp:125
#18 0x00007f2163bee0ef in QMetaObject::activate (sender=sender@entry=0x1a36d00, m=m@entry=0x7f2163a217a0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff77140fd0) at kernel/qobject.cpp:3539
#19 0x00007f2162f79152 in QAction::triggered (this=this@entry=0x1a36d00, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#20 0x00007f2162f7a580 in QAction::activate (this=this@entry=0x1a36d00, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#21 0x00007f21633b8933 in QMenuPrivate::activateCausedStack (this=this@entry=0x187c4a0, causedStack=..., action=action@entry=0x1a36d00, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1038
#22 0x00007f21633bdbf9 in QMenuPrivate::activateAction (this=0x187c4a0, action=0x1a36d00, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1130
#23 0x00007f21633c16ed in QMenu::mouseReleaseEvent (this=this@entry=0x187c460, e=e@entry=0x7fff77141b70) at widgets/qmenu.cpp:2372
#24 0x00007f216492f800 in KMenu::mouseReleaseEvent (this=0x187c460, e=0x7fff77141b70) at ../../kdeui/widgets/kmenu.cpp:464
#25 0x00007f2162fcca89 in QWidget::event (this=this@entry=0x187c460, event=event@entry=0x7fff77141b70) at kernel/qwidget.cpp:8375
#26 0x00007f21633bf3db in QMenu::event (this=0x187c460, e=0x7fff77141b70) at widgets/qmenu.cpp:2481
#27 0x00007f2162f7f8ec in QApplicationPrivate::notify_helper (this=this@entry=0x1080d90, receiver=receiver@entry=0x187c460, e=e@entry=0x7fff77141b70) at kernel/qapplication.cpp:4567
#28 0x00007f2162f82a33 in QApplication::notify (this=this@entry=0x7fff771459e0, receiver=receiver@entry=0x187c460, e=e@entry=0x7fff77141b70) at kernel/qapplication.cpp:4110
#29 0x00007f2164878af6 in KApplication::notify (this=0x7fff771459e0, receiver=0x187c460, event=0x7fff77141b70) at ../../kdeui/kernel/kapplication.cpp:311
#30 0x00007f2163bd963e in QCoreApplication::notifyInternal (this=0x7fff771459e0, receiver=receiver@entry=0x187c460, event=event@entry=0x7fff77141b70) at kernel/qcoreapplication.cpp:946
#31 0x00007f2162f85933 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#32 QApplicationPrivate::sendMouseEvent (receiver=0x187c460, event=event@entry=0x7fff77141b70, alienWidget=0x0, nativeWidget=nativeWidget@entry=0x187c460, buttonDown=buttonDown@entry=0x7f2163a5d308 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#33 0x00007f2162ffad8c in QETWidget::translateMouseEvent (this=this@entry=0x187c460, event=event@entry=0x7fff771422f0) at kernel/qapplication_x11.cpp:4565
#34 0x00007f2162ff9ef1 in QApplication::x11ProcessEvent (this=0x7fff771459e0, event=event@entry=0x7fff771422f0) at kernel/qapplication_x11.cpp:3746
#35 0x00007f21630250b2 in x11EventSourceDispatch (s=0x10816c0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#36 0x00007f215f058f05 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f215f059248 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007f215f059304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007f2163c08016 in QEventDispatcherGlib::processEvents (this=0x107de30, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#40 0x00007f21630251ae in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#41 0x00007f2163bd838f in QEventLoop::processEvents (this=this@entry=0x7fff771426d0, flags=...) at kernel/qeventloop.cpp:149
#42 0x00007f2163bd8618 in QEventLoop::exec (this=this@entry=0x7fff771426d0, flags=...) at kernel/qeventloop.cpp:204
#43 0x00007f21633bcc65 in QMenu::exec (this=0x187c460, p=..., action=action@entry=0x0) at widgets/qmenu.cpp:2125
#44 0x00007f21633cb7e2 in QPushButtonPrivate::_q_popupPressed (this=0x24b9150) at widgets/qpushbutton.cpp:592
#45 0x00007f2163bee0ef in QMetaObject::activate (sender=sender@entry=0x240ca40, m=m@entry=0x7f2163a4aca0 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3539
#46 0x00007f21635eac30 in QAbstractButton::pressed (this=this@entry=0x240ca40) at .moc/release-shared/moc_qabstractbutton.cpp:207
#47 0x00007f216333df61 in QAbstractButtonPrivate::emitPressed (this=this@entry=0x24b9150) at widgets/qabstractbutton.cpp:562
#48 0x00007f216333e12c in QAbstractButton::mousePressEvent (this=0x240ca40, e=0x7fff771430c0) at widgets/qabstractbutton.cpp:1098
#49 0x00007f2162fcca70 in QWidget::event (this=0x240ca40, event=0x7fff771430c0) at kernel/qwidget.cpp:8371
#50 0x00007f2162f7f8ec in QApplicationPrivate::notify_helper (this=this@entry=0x1080d90, receiver=receiver@entry=0x240ca40, e=e@entry=0x7fff771430c0) at kernel/qapplication.cpp:4567
#51 0x00007f2162f82a33 in QApplication::notify (this=this@entry=0x7fff771459e0, receiver=receiver@entry=0x240ca40, e=e@entry=0x7fff771430c0) at kernel/qapplication.cpp:4110
#52 0x00007f2164878af6 in KApplication::notify (this=0x7fff771459e0, receiver=0x240ca40, event=0x7fff771430c0) at ../../kdeui/kernel/kapplication.cpp:311
#53 0x00007f2163bd963e in QCoreApplication::notifyInternal (this=0x7fff771459e0, receiver=receiver@entry=0x240ca40, event=event@entry=0x7fff771430c0) at kernel/qcoreapplication.cpp:946
#54 0x00007f2162f85933 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#55 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x240ca40, event=event@entry=0x7fff771430c0, alienWidget=alienWidget@entry=0x240ca40, nativeWidget=nativeWidget@entry=0x1764320, buttonDown=buttonDown@entry=0x7f2163a5d308 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#56 0x00007f2162ffaec4 in QETWidget::translateMouseEvent (this=this@entry=0x1764320, event=event@entry=0x7fff77143840) at kernel/qapplication_x11.cpp:4631
#57 0x00007f2162ff9ef1 in QApplication::x11ProcessEvent (this=0x7fff771459e0, event=event@entry=0x7fff77143840) at kernel/qapplication_x11.cpp:3746
#58 0x00007f21630250b2 in x11EventSourceDispatch (s=0x10816c0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#59 0x00007f215f058f05 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#60 0x00007f215f059248 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#61 0x00007f215f059304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#62 0x00007f2163c08016 in QEventDispatcherGlib::processEvents (this=0x107de30, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#63 0x00007f21630251ae in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#64 0x00007f2163bd838f in QEventLoop::processEvents (this=this@entry=0x7fff77143c20, flags=...) at kernel/qeventloop.cpp:149
#65 0x00007f2163bd8618 in QEventLoop::exec (this=this@entry=0x7fff77143c20, flags=...) at kernel/qeventloop.cpp:204
#66 0x00007f216343a1c8 in QDialog::exec (this=0x1764320) at dialogs/qdialog.cpp:554
#67 0x00000000006a9082 in UMLWidget::showPropertiesDialog (this=0x1874610) at ../../../umbrello/umbrello/widgets/umlwidget.cpp:905
#68 0x00000000006ad5a1 in UMLWidget::slotMenuSelection (this=0x1874610, action=<optimized out>) at ../../../umbrello/umbrello/widgets/umlwidget.cpp:413
#69 0x00007f2163bee0ef in QMetaObject::activate (sender=sender@entry=0x17fb390, m=m@entry=0x7f2163a30c80 <QMenu::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fff77143e80) at kernel/qobject.cpp:3539
#70 0x00007f21633b86c2 in QMenu::triggered (this=this@entry=0x17fb390, _t1=_t1@entry=0x243b3f0) at .moc/release-shared/moc_qmenu.cpp:178
#71 0x00007f21633b9c4b in QMenuPrivate::_q_actionTriggered (this=0x23e7f40) at widgets/qmenu.cpp:1156
#72 0x00007f2163bee0ef in QMetaObject::activate (sender=sender@entry=0x243b3f0, m=m@entry=0x7f2163a217a0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff77144030) at kernel/qobject.cpp:3539
#73 0x00007f2162f79152 in QAction::triggered (this=this@entry=0x243b3f0, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#74 0x00007f2162f7a580 in QAction::activate (this=this@entry=0x243b3f0, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#75 0x00007f21633b8933 in QMenuPrivate::activateCausedStack (this=this@entry=0x23e7f40, causedStack=..., action=action@entry=0x243b3f0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1038
#76 0x00007f21633bdbf9 in QMenuPrivate::activateAction (this=0x23e7f40, action=0x243b3f0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1130
#77 0x00007f21633c16ed in QMenu::mouseReleaseEvent (this=this@entry=0x17fb390, e=e@entry=0x7fff77144bd0) at widgets/qmenu.cpp:2372
#78 0x00007f216492f800 in KMenu::mouseReleaseEvent (this=0x17fb390, e=0x7fff77144bd0) at ../../kdeui/widgets/kmenu.cpp:464
#79 0x00007f2162fcca89 in QWidget::event (this=this@entry=0x17fb390, event=event@entry=0x7fff77144bd0) at kernel/qwidget.cpp:8375
#80 0x00007f21633bf3db in QMenu::event (this=0x17fb390, e=0x7fff77144bd0) at widgets/qmenu.cpp:2481
#81 0x00007f2162f7f8ec in QApplicationPrivate::notify_helper (this=this@entry=0x1080d90, receiver=receiver@entry=0x17fb390, e=e@entry=0x7fff77144bd0) at kernel/qapplication.cpp:4567
#82 0x00007f2162f82a33 in QApplication::notify (this=this@entry=0x7fff771459e0, receiver=receiver@entry=0x17fb390, e=e@entry=0x7fff77144bd0) at kernel/qapplication.cpp:4110
#83 0x00007f2164878af6 in KApplication::notify (this=0x7fff771459e0, receiver=0x17fb390, event=0x7fff77144bd0) at ../../kdeui/kernel/kapplication.cpp:311
#84 0x00007f2163bd963e in QCoreApplication::notifyInternal (this=0x7fff771459e0, receiver=receiver@entry=0x17fb390, event=event@entry=0x7fff77144bd0) at kernel/qcoreapplication.cpp:946
#85 0x00007f2162f85933 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#86 QApplicationPrivate::sendMouseEvent (receiver=0x17fb390, event=event@entry=0x7fff77144bd0, alienWidget=0x0, nativeWidget=nativeWidget@entry=0x17fb390, buttonDown=buttonDown@entry=0x7f2163a5d308 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#87 0x00007f2162ffad8c in QETWidget::translateMouseEvent (this=this@entry=0x17fb390, event=event@entry=0x7fff77145350) at kernel/qapplication_x11.cpp:4565
#88 0x00007f2162ff9ef1 in QApplication::x11ProcessEvent (this=0x7fff771459e0, event=event@entry=0x7fff77145350) at kernel/qapplication_x11.cpp:3746
#89 0x00007f21630250b2 in x11EventSourceDispatch (s=0x10816c0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#90 0x00007f215f058f05 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#91 0x00007f215f059248 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#92 0x00007f215f059304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#93 0x00007f2163c08016 in QEventDispatcherGlib::processEvents (this=0x107de30, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#94 0x00007f21630251ae in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#95 0x00007f2163bd838f in QEventLoop::processEvents (this=this@entry=0x7fff77145720, flags=...) at kernel/qeventloop.cpp:149
#96 0x00007f2163bd8618 in QEventLoop::exec (this=this@entry=0x7fff77145720, flags=...) at kernel/qeventloop.cpp:204
#97 0x00007f2163bddcf6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#98 0x00007f2162f7dffc in QApplication::exec () at kernel/qapplication.cpp:3828
#99 0x000000000043820b in main (argc=2, argv=0x7fff77145b38) at ../../../umbrello/umbrello/main.cpp:111

Reported using DrKonqi
Comment 1 Andi Fischer 2013-09-23 17:33:16 UTC
Git commit 8eb9a5457ca292712c75ca5efbc4bf5ff2f88afc by Andi Fischer, on behalf of Joris Steyn.
Committed on 23/09/2013 at 17:27.
Pushed by fischer into branch 'master'.

Fix crash when adding entity constraints

The root cause of this crash is not checking for a valid index when retrieving
the item from the QList. We should at least check that value before calling at().

The patch I propose adds this check and also fixes the problem causing the
index to be wrong in the first place (like Arash Abedinzadeh described).
Related: bug 191396, bug 237992, bug 257540, bug 302120

M  +12   -11   umbrello/dialogs/classifierlistpage.cpp
M  +1    -1    umbrello/dialogs/classifierlistpage.h
M  +9    -0    umbrello/dialogs/constraintlistpage.cpp
M  +1    -0    umbrello/dialogs/constraintlistpage.h

http://commits.kde.org/umbrello/8eb9a5457ca292712c75ca5efbc4bf5ff2f88afc
Comment 2 Joris Steyn 2013-11-27 19:03:41 UTC
Git commit 29dbb0f09e083613f2acbab2ca14cb999149bbad by Joris Steyn.
Committed on 23/09/2013 at 17:27.
Pushed by jorissteyn into branch 'KDE/4.11'.

Fix crash when adding entity constraints
Related: bug 191396, bug 237992, bug 257540, bug 302120
FIXED-IN: 4.11.4

Cherry-picked from 8eb9a5457ca292712c75ca5efbc4bf5ff2f88afc.

Conflicts (resolved):
	umbrello/dialogs/classifierlistpage.cpp

M  +11   -10   umbrello/dialogs/classifierlistpage.cpp
M  +1    -1    umbrello/dialogs/classifierlistpage.h
M  +9    -0    umbrello/dialogs/constraintlistpage.cpp
M  +1    -0    umbrello/dialogs/constraintlistpage.h

http://commits.kde.org/umbrello/29dbb0f09e083613f2acbab2ca14cb999149bbad