Bug 293770 - umbrello crashs when importing templated java source code
Summary: umbrello crashs when importing templated java source code
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
: 301150 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-10 12:46 UTC by thomas
Modified: 2013-11-06 17:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thomas 2012-02-10 12:46:42 UTC
Application: umbrello (2.8.0)
KDE Platform Version: 4.8.00 (4.8.0 (Compiled from sources)
Qt Version: 4.8.0
Operating System: Linux 3.2.5-gentoo x86_64
Distribution: "Gentoo Base System release 2.1"

-- Information about the crash:
- What I was doing when the application crashed:
Open Umbrello and import a Java v6 project using templates.

Console ouput directly before the crash:
umbrello(4935): importJava: ignoring excess chars at  "ResultPK"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "SetGet"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputString"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputShort"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputLong"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputInt"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputFloat"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputFile"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "Closer"  ( "<" ) 
umbrello(4935): importJava: no class set for  "FileTypeAnno" 
umbrello(4935): importJava: ignoring excess chars at  "Opener"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputEnum"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputDouble"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputDate"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputChar"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputByte"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "RawInputBoolean"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "AddEventListener"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "DelEventListener"  ( "<" ) 
umbrello(4935): importJava: ignoring excess chars at  "DummyListitemRenderer"  ( "<" ) 
umbrello(4935): importJava: ignoring  "<"  at  125 ,  1305  in  "Queries" 
umbrello(4935): importJava: expecting name in  "entityManager.createQuery" 
KCrash: Application 'umbrello' crashing...

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 0x7fa2ca131760 (LWP 4935))]

Thread 3 (Thread 0x7fa2b8d6a700 (LWP 5365)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fa2c6b3348b in wait (time=18446744073709551615, this=0xc1e030) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0xc64eb0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fa2c7e17744 in QFileInfoGatherer::run (this=0xc64ea0) at dialogs/qfileinfogatherer.cpp:214
#4  0x00007fa2c6b3248d in QThreadPrivate::start (arg=0xc64ea0) at thread/qthread_unix.cpp:298
#5  0x00007fa2c689cd0c in start_thread (arg=0x7fa2b8d6a700) at pthread_create.c:301
#6  0x00007fa2c5e4b8dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7fa2b84c4700 (LWP 5370)):
#0  0x00007fa2c5e42b63 in *__GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fa2c2d54674 in g_main_context_poll (n_fds=1, fds=0xd28b50, timeout=-1, context=0xc440f0, priority=<optimized out>) at gmain.c:3402
#2  g_main_context_iterate (context=0xc440f0, block=1, dispatch=1, self=<optimized out>) at gmain.c:3084
#3  0x00007fa2c2d54b31 in g_main_context_iteration (context=0xc440f0, may_block=1) at gmain.c:3152
#4  0x00007fa2c6c74456 in QEventDispatcherGlib::processEvents (this=0xc135b0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007fa2c6c40c02 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fa2c6c40e95 in QEventLoop::exec (this=0x7fa2b84c3de0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007fa2c6b2ff08 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x00007fa2c6c1e480 in QInotifyFileSystemWatcherEngine::run (this=0xc1e240) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007fa2c6b3248d in QThreadPrivate::start (arg=0xc1e240) at thread/qthread_unix.cpp:298
#10 0x00007fa2c689cd0c in start_thread (arg=0x7fa2b84c4700) at pthread_create.c:301
#11 0x00007fa2c5e4b8dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7fa2ca131760 (LWP 4935)):
[KCrash Handler]
#6  QString::QString (this=0x7fff8a7166a0, other=...) at /usr/include/qt4/QtCore/qstring.h:725
#7  0x00000000006e32dd in UMLObject::name (this=<optimized out>) at /var/tmp/portage/kde-base/umbrello-4.8.0/work/umbrello-4.8.0/umbrello/umbrello/umlobject.cpp:186
#8  0x0000000000545a4e in JavaImport::parseStmt (this=0x18db070) at /var/tmp/portage/kde-base/umbrello-4.8.0/work/umbrello-4.8.0/umbrello/umbrello/codeimport/javaimport.cpp:478
#9  0x00000000005478e7 in NativeImportBase::parseFile (this=0x18db070, filename=...) at /var/tmp/portage/kde-base/umbrello-4.8.0/work/umbrello-4.8.0/umbrello/umbrello/codeimport/nativeimportbase.cpp:421
#10 0x0000000000542e5e in JavaImport::parseFile (this=0x18db070, filename=...) at /var/tmp/portage/kde-base/umbrello-4.8.0/work/umbrello-4.8.0/umbrello/umbrello/codeimport/javaimport.cpp:258
#11 0x00000000004c54f4 in CodeImpStatusPage::importCode (this=0xdb48c0) at /var/tmp/portage/kde-base/umbrello-4.8.0/work/umbrello-4.8.0/umbrello/umbrello/codeimpwizard/codeimpstatuspage.cpp:134
#12 0x00007fa2c6c5ab71 in QMetaObject::activate (sender=0xd86960, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff8a716fa0) at kernel/qobject.cpp:3547
#13 0x00007fa2c7fc69e2 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/debug-shared/moc_qabstractbutton.cpp:220
#14 0x00007fa2c7cc20cb in QAbstractButtonPrivate::emitClicked (this=<optimized out>) at widgets/qabstractbutton.cpp:546
#15 0x00007fa2c7cc377b in QAbstractButtonPrivate::click (this=0xd86990) at widgets/qabstractbutton.cpp:539
#16 0x00007fa2c7cc39ec in QAbstractButton::mouseReleaseEvent (this=0xd86960, e=0x7fff8a717aa0) at widgets/qabstractbutton.cpp:1121
#17 0x00007fa2c791e509 in QWidget::event (this=0xd86960, event=0x7fff8a717aa0) at kernel/qwidget.cpp:8361
#18 0x00007fa2c78c50f4 in QApplicationPrivate::notify_helper (this=0xaf3d10, receiver=0xd86960, e=0x7fff8a717aa0) at kernel/qapplication.cpp:4550
#19 0x00007fa2c78cb011 in QApplication::notify (this=<optimized out>, receiver=0xd86960, e=0x7fff8a717aa0) at kernel/qapplication.cpp:4093
#20 0x00007fa2c86c0a76 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#21 0x00007fa2c6c4246b in QCoreApplication::notifyInternal (this=0x7fff8a71a0e0, receiver=0xd86960, event=0x7fff8a717aa0) at kernel/qcoreapplication.cpp:876
#22 0x00007fa2c78c652b in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#23 QApplicationPrivate::sendMouseEvent (receiver=0xd86960, event=0x7fff8a717aa0, alienWidget=0xd86960, nativeWidget=0xe15560, buttonDown=0x7fa2c8462ab8, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3161
#24 0x00007fa2c794eba8 in QETWidget::translateMouseEvent (this=0xe15560, event=<optimized out>) at kernel/qapplication_x11.cpp:4494
#25 0x00007fa2c794d239 in QApplication::x11ProcessEvent (this=0x7fff8a71a0e0, event=0x7fff8a718250) at kernel/qapplication_x11.cpp:3620
#26 0x00007fa2c7976322 in x11EventSourceDispatch (s=0xaf6ab0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#27 0x00007fa2c2d54162 in g_main_dispatch (context=0xaf6400) at gmain.c:2441
#28 g_main_context_dispatch (context=0xaf6400) at gmain.c:3011
#29 0x00007fa2c2d54958 in g_main_context_iterate (context=0xaf6400, block=1, dispatch=1, self=<optimized out>) at gmain.c:3089
#30 0x00007fa2c2d54b31 in g_main_context_iteration (context=0xaf6400, may_block=1) at gmain.c:3152
#31 0x00007fa2c6c743ff in QEventDispatcherGlib::processEvents (this=0xaec0e0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#32 0x00007fa2c7975fbe in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007fa2c6c40c02 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#34 0x00007fa2c6c40e95 in QEventLoop::exec (this=0x7fff8a718560, flags=...) at kernel/qeventloop.cpp:204
#35 0x00007fa2c7dd7fae in QDialog::exec (this=0xe15560) at dialogs/qdialog.cpp:552
#36 0x00000000006bb376 in UMLApp::slotImportingWizard (this=<optimized out>) at /var/tmp/portage/kde-base/umbrello-4.8.0/work/umbrello-4.8.0/umbrello/umbrello/uml.cpp:2419
#37 0x00007fa2c6c5ab71 in QMetaObject::activate (sender=0xbe63e0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff8a718750) at kernel/qobject.cpp:3547
#38 0x00007fa2c78be662 in QAction::triggered (this=<optimized out>, _t1=false) at .moc/debug-shared/moc_qaction.cpp:277
#39 0x00007fa2c78be85a in QAction::activate (this=0xbe63e0, event=<optimized out>) at kernel/qaction.cpp:1257
#40 0x00007fa2c7d49ee3 in QMenuPrivate::activateCausedStack (this=0xe780c0, causedStack=..., action=0xbe63e0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1028
#41 0x00007fa2c7d50cca in QMenuPrivate::activateAction (this=0xe780c0, action=0xbe63e0, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1120
#42 0x00007fa2c87826c0 in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libkdeui.so.5
#43 0x00007fa2c791e509 in QWidget::event (this=0xe3adf0, event=0x7fff8a719560) at kernel/qwidget.cpp:8361
#44 0x00007fa2c7d51f8b in QMenu::event (this=0xe3adf0, e=0x7fff8a719560) at widgets/qmenu.cpp:2460
#45 0x00007fa2c78c50f4 in QApplicationPrivate::notify_helper (this=0xaf3d10, receiver=0xe3adf0, e=0x7fff8a719560) at kernel/qapplication.cpp:4550
#46 0x00007fa2c78cb011 in QApplication::notify (this=<optimized out>, receiver=0xe3adf0, e=0x7fff8a719560) at kernel/qapplication.cpp:4093
#47 0x00007fa2c86c0a76 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#48 0x00007fa2c6c4246b in QCoreApplication::notifyInternal (this=0x7fff8a71a0e0, receiver=0xe3adf0, event=0x7fff8a719560) at kernel/qcoreapplication.cpp:876
#49 0x00007fa2c78c652b in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#50 QApplicationPrivate::sendMouseEvent (receiver=0xe3adf0, event=0x7fff8a719560, alienWidget=0x0, nativeWidget=0xe3adf0, buttonDown=0x7fa2c8462ab8, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3161
#51 0x00007fa2c794ee04 in QETWidget::translateMouseEvent (this=0xe3adf0, event=<optimized out>) at kernel/qapplication_x11.cpp:4428
#52 0x00007fa2c794d239 in QApplication::x11ProcessEvent (this=0x7fff8a71a0e0, event=0x7fff8a719d10) at kernel/qapplication_x11.cpp:3620
#53 0x00007fa2c7976322 in x11EventSourceDispatch (s=0xaf6ab0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#54 0x00007fa2c2d54162 in g_main_dispatch (context=0xaf6400) at gmain.c:2441
#55 g_main_context_dispatch (context=0xaf6400) at gmain.c:3011
#56 0x00007fa2c2d54958 in g_main_context_iterate (context=0xaf6400, block=1, dispatch=1, self=<optimized out>) at gmain.c:3089
#57 0x00007fa2c2d54b31 in g_main_context_iteration (context=0xaf6400, may_block=1) at gmain.c:3152
#58 0x00007fa2c6c743ff in QEventDispatcherGlib::processEvents (this=0xaec0e0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#59 0x00007fa2c7975fbe in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#60 0x00007fa2c6c40c02 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#61 0x00007fa2c6c40e95 in QEventLoop::exec (this=0x7fff8a71a020, flags=...) at kernel/qeventloop.cpp:204
#62 0x00007fa2c6c45f4b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#63 0x0000000000699795 in main (argc=1, argv=0x7fff8a71a518) at /var/tmp/portage/kde-base/umbrello-4.8.0/work/umbrello-4.8.0/umbrello/umbrello/main.cpp:111

Reported using DrKonqi
Comment 1 Oliver Kellogg 2012-02-12 21:34:57 UTC
Could you attach Java code that triggers the crash?
Thanks.
Comment 2 thomas 2012-02-12 22:22:32 UTC
A minimized sample:

public class Bug{
	public static <T> void walk(){
		jump();
	}

	public static <T> Class<T> jump(){
		return null;
	}
}
Comment 3 Oliver Kellogg 2012-02-13 07:25:57 UTC
SVN commit 1279716 by okellogg:

parseStmt(): Check for keyword == "<" and skipToClosing('<') short before
expecting `keyword' to be a type name. If `keyword' is then not a type name,
avoid accessing m_klass in the error message if m_klass is NULL.



 M  +16 -1     javaimport.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1279716
Comment 4 Oliver Kellogg 2012-02-13 07:29:33 UTC
(In reply to comment #2)
> A minimized sample:
> 
> public class Bug{
>     public static <T> void walk(){
>         jump();
>     }
> 
>     public static <T> Class<T> jump(){
>         return null;
>     }
> }

Thanks.
With r1279716 at least it does not crash anymore but it's probably not perfect yet.
I'll test some more before setting this to FIXED.
Comment 5 Oliver Kellogg 2012-02-13 18:25:12 UTC
Yup, r1279716 did the trick.
Comment 6 Oliver Kellogg 2012-06-04 20:42:52 UTC
*** Bug 301150 has been marked as a duplicate of this bug. ***
Comment 7 Ralf Habacker 2013-11-06 17:17:08 UTC
apply fixed bug from 4.9.0 changelog