Bug 333363 - Crash when doing code import.
Summary: Crash when doing code import.
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-04-13 02:00 UTC by pwagner9000
Modified: 2014-06-16 19:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pwagner9000 2014-04-13 02:00:54 UTC
Application: umbrello (2.12.99-9f77894)
KDE Platform Version: 4.11.5
Qt Version: 4.8.5
Operating System: Linux 3.11.10-7-desktop x86_64
Distribution: "openSUSE 13.1 (Bottle) (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
When using the "Code Importing Wizard" selecting a base directory with >125 Ada files. Immediate crash/closure of the program umbello
Note: To start umbello the following command was used "/home/userdirectory/umbrello/bin/umbrello --geometry 600X400+0+0&"

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

Thread 3 (Thread 0x7f3d85f98700 (LWP 11503)):
#0  0x00007f3d976ef0af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f3d97982b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f3d970d9ac6 in ?? () from /usr/lib64/libQtGui.so.4
#3  0x00007f3d9798268f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f3d976eb0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f3d95f3a90d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f3d85797700 (LWP 11504)):
#0  0x00007f3d95f31b3d in poll () from /lib64/libc.so.6
#1  0x00007f3d9258b604 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f3d9258b70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f3d97aaed76 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007f3d97a80d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007f3d97a81005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007f3d9797ffef in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007f3d97a62513 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007f3d9798268f in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007f3d976eb0db in start_thread () from /lib64/libpthread.so.0
#10 0x00007f3d95f3a90d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f3d9a24f880 (LWP 11466)):
[KCrash Handler]
#5  0x00007f3d979c5d00 in QString::operator==(QString const&) const () from /usr/lib64/libQtCore.so.4
#6  0x00000000006309e6 in operator!= (s=..., this=0x60) at /usr/include/QtCore/qstring.h:406
#7  UMLAttribute::setInitialValue (this=0x0, iv=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/attribute.cpp:110
#8  0x00000000004f7026 in AdaImport::parseStmt (this=0x2b316b0) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/adaimport.cpp:620
#9  0x0000000000506452 in NativeImportBase::parseFile (this=0x2b316b0, filename=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/nativeimportbase.cpp:425
#10 0x00000000004f34d7 in AdaImport::parseStems (this=this@entry=0x2b316b0, stems=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/adaimport.cpp:187
#11 0x00000000004f41a8 in AdaImport::parseStmt (this=0x2b316b0) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/adaimport.cpp:226
#12 0x0000000000506452 in NativeImportBase::parseFile (this=0x2b316b0, filename=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/nativeimportbase.cpp:425
#13 0x00000000004f34d7 in AdaImport::parseStems (this=this@entry=0x2b316b0, stems=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/adaimport.cpp:187
#14 0x00000000004f41a8 in AdaImport::parseStmt (this=0x2b316b0) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/adaimport.cpp:226
#15 0x0000000000506452 in NativeImportBase::parseFile (this=0x2b316b0, filename=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/nativeimportbase.cpp:425
#16 0x00000000004f34d7 in AdaImport::parseStems (this=this@entry=0x2b316b0, stems=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/adaimport.cpp:187
#17 0x00000000004f41a8 in AdaImport::parseStmt (this=0x2b316b0) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/adaimport.cpp:226
#18 0x0000000000506452 in NativeImportBase::parseFile (this=0x2b316b0, filename=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/nativeimportbase.cpp:425
#19 0x00000000004f34d7 in AdaImport::parseStems (this=this@entry=0x2b316b0, stems=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/adaimport.cpp:187
#20 0x00000000004f48f8 in AdaImport::parseStmt (this=0x2b316b0) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/adaimport.cpp:240
#21 0x0000000000506452 in NativeImportBase::parseFile (this=0x2b316b0, filename=...) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimport/nativeimportbase.cpp:425
#22 0x00000000004967f5 in CodeImpThread::run (this=0x2ac7170) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimpwizard/codeimpthread.cpp:62
#23 0x0000000000494bbe in CodeImpStatusPage::importCodeFile (this=this@entry=0x257a5d0, noError=noError@entry=true) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimpwizard/codeimpstatuspage.cpp:181
#24 0x0000000000494e6f in CodeImpStatusPage::importCode (this=0x257a5d0) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/codeimpwizard/codeimpstatuspage.cpp:150
#25 0x00007f3d97a95d68 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#26 0x00007f3d9724a4e2 in QAbstractButton::clicked(bool) () from /usr/lib64/libQtGui.so.4
#27 0x00007f3d96fae4d3 in ?? () from /usr/lib64/libQtGui.so.4
#28 0x00007f3d96faf643 in ?? () from /usr/lib64/libQtGui.so.4
#29 0x00007f3d96faf72c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#30 0x00007f3d96c50dfe in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#31 0x00007f3d96c018ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#32 0x00007f3d96c07fad in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#33 0x00007f3d989c018a in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#34 0x00007f3d97a820ad in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#35 0x00007f3d96c07763 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQtGui.so.4
#36 0x00007f3d96c78f7b in ?? () from /usr/lib64/libQtGui.so.4
#37 0x00007f3d96c779ec in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#38 0x00007f3d96c9e882 in ?? () from /usr/lib64/libQtGui.so.4
#39 0x00007f3d9258b316 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#40 0x00007f3d9258b668 in ?? () from /usr/lib64/libglib-2.0.so.0
#41 0x00007f3d9258b70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#42 0x00007f3d97aaed55 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#43 0x00007f3d96c9e936 in ?? () from /usr/lib64/libQtGui.so.4
#44 0x00007f3d97a80d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#45 0x00007f3d97a81005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#46 0x00007f3d970a3cdc in QDialog::exec() () from /usr/lib64/libQtGui.so.4
#47 0x000000000068911f in UMLApp::slotImportingWizard (this=<optimized out>) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/uml.cpp:2631
#48 0x00007f3d97a95d68 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#49 0x00007f3d96bfb752 in QAction::triggered(bool) () from /usr/lib64/libQtGui.so.4
#50 0x00007f3d96bfd123 in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQtGui.so.4
#51 0x00007f3d970260e9 in ?? () from /usr/lib64/libQtGui.so.4
#52 0x00007f3d9702a619 in ?? () from /usr/lib64/libQtGui.so.4
#53 0x00007f3d98a76735 in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libkdeui.so.5
#54 0x00007f3d96c50dfe in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#55 0x00007f3d9702e3eb in QMenu::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#56 0x00007f3d96c018ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#57 0x00007f3d96c07fad in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#58 0x00007f3d989c018a in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#59 0x00007f3d97a820ad in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#60 0x00007f3d96c07763 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQtGui.so.4
#61 0x00007f3d96c792ac in ?? () from /usr/lib64/libQtGui.so.4
#62 0x00007f3d96c779ec in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#63 0x00007f3d96c9e882 in ?? () from /usr/lib64/libQtGui.so.4
#64 0x00007f3d9258b316 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#65 0x00007f3d9258b668 in ?? () from /usr/lib64/libglib-2.0.so.0
#66 0x00007f3d9258b70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#67 0x00007f3d97aaed76 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#68 0x00007f3d96c9e936 in ?? () from /usr/lib64/libQtGui.so.4
#69 0x00007f3d97a80d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#70 0x00007f3d97a81005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#71 0x00007f3d97a8613b in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#72 0x000000000043b359 in main (argc=<optimized out>, argv=<optimized out>) at /home/pwwagner/Desktop/work/src/umbrello/umbrello/main.cpp:123

Reported using DrKonqi
Comment 1 Ralf Habacker 2014-04-13 18:34:17 UTC
Please append a test case
Comment 2 Oliver Kellogg 2014-04-14 06:08:16 UTC
(In reply to comment #1)
> Please append a test case

Agreed, test case is necessary for a definitive fix.

OTOH, looking at the backtrace,
Thread 1 [...]
#7 UMLAttribute::setInitialValue (this=0x0, iv=...) at attribute.cpp:110
#8 0x00000000004f7026 in AdaImport::parseStmt (this=0x2b316b0) at codeimport/adaimport.cpp:620

At adaimport.cpp:620 we have a dereference of  'attr' without preceding check for NULL pointer:
619    UMLAttribute *attr = static_cast<UMLAttribute*>(o);
620    attr->setInitialValue(initialValue);

The crash is inevitable here (even without knowing the exact use case.)
Comment 3 Ralf Habacker 2014-04-14 08:57:06 UTC
Git commit 3094593ec89e2fbb1505b3e1ee472c42b4d90826 by Ralf Habacker.
Committed on 14/04/2014 at 08:53.
Pushed by habacker into branch 'master'.

Crash fix on ada import.

M  +4    -2    umbrello/codeimport/adaimport.cpp

http://commits.kde.org/umbrello/3094593ec89e2fbb1505b3e1ee472c42b4d90826
Comment 4 Ralf Habacker 2014-04-14 09:00:09 UTC
Git commit 7ac0855f618f0bf32cf1a65eb9d27cf0c90540e1 by Ralf Habacker.
Committed on 14/04/2014 at 08:53.
Pushed by habacker into branch 'KDE/4.13'.

Crash fix on ada import.
FIXED-IN:4.13.0
(cherry picked from commit 3094593ec89e2fbb1505b3e1ee472c42b4d90826)

M  +4    -2    umbrello/codeimport/adaimport.cpp

http://commits.kde.org/umbrello/7ac0855f618f0bf32cf1a65eb9d27cf0c90540e1
Comment 5 Ralf Habacker 2014-04-14 09:01:10 UTC
Git commit c2228a10e11a0ab5f37359a9f631d69228e9d5b3 by Ralf Habacker.
Committed on 14/04/2014 at 08:53.
Pushed by habacker into branch 'KDE/4.12'.

Crash fix on ada import.
FIXED-IN:4.12.5
(cherry picked from commit 3094593ec89e2fbb1505b3e1ee472c42b4d90826)

M  +4    -2    umbrello/codeimport/adaimport.cpp

http://commits.kde.org/umbrello/c2228a10e11a0ab5f37359a9f631d69228e9d5b3
Comment 6 Ralf Habacker 2014-04-16 06:23:23 UTC
For the (In reply to comment #2)
> (In reply to comment #1)
> > Please append a test case
> 
> Agreed, test case is necessary for a definitive fix.
In the crash case the code importer writes in  Import_Utils::insertAttribute()
        DEBUG(DBG_SRC) << "insertAttribute: Don not know what to do with "
                 << owner->name() << " (object type " << UMLObject::toString(ot) << ")";
which indicates a issue with the parser or the related ada code. If this is a parser issue a related bug should be opened.
Comment 7 Oliver Kellogg 2014-05-08 04:58:27 UTC
Git commit 17abd847cb78dd6e895a490f3a6fc02fe0433cc0 by Oliver Kellogg.
Committed on 08/05/2014 at 04:51.
Pushed by okellogg into branch 'master'.

umbrello/codeimport/adaimport.cpp

- Fix crash on Ada import seen after primary crash cause was lifted
  (followup to commit 3094593)

M  +1    -1    umbrello/codeimport/adaimport.cpp

http://commits.kde.org/umbrello/17abd847cb78dd6e895a490f3a6fc02fe0433cc0
Comment 8 Oliver Kellogg 2014-06-16 19:42:08 UTC
Git commit 3b43de1ee590214b3fd26e3b5f749dc03525da1d by Oliver Kellogg.
Committed on 08/05/2014 at 04:51.
Pushed by okellogg into branch 'KDE/4.13'.

umbrello/codeimport/adaimport.cpp

- Fix crash on Ada import seen after primary crash cause was lifted
  (followup to commit 3094593)

M  +1    -1    umbrello/codeimport/adaimport.cpp

http://commits.kde.org/umbrello/3b43de1ee590214b3fd26e3b5f749dc03525da1d