Bug 342001 - crashes when importing C# project
Summary: crashes when importing C# project
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.13.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-18 12:14 UTC by Ygor Mutti
Modified: 2015-08-18 16:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.14.2 (KDE 4.14.2)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ygor Mutti 2014-12-18 12:14:54 UTC
I'm trying to import a C# project (closed source) into Umbrello using the "import project" option, but I can't because it crashes during the import process.

Reproducible: Always

Steps to Reproduce:
1. Open the "Code" menu, then the "Active language" submenu and click C#.
2. Open the "Code" menu, then click the "Import project..." command, select the directory containing the C# project and click the "OK" button.

Actual Results:  
I can see some classes from the project are imported looking at the Command history panel, then Umbrello crashes.

Expected Results:  
Do not crash and import the project.

Application: umbrello (2.13.3)
KDE Platform Version: 4.13.3
Qt Version: 4.8.6
Operating System: Linux 3.13.0-43-generic x86_64
Distribution: Ubuntu 14.04.1 LTS

-- Backtrace:
Application: Umbrello UML Modeller (umbrello), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ffaf4e927c0 (LWP 6218))]

Thread 9 (Thread 0x7ffae2d41700 (LWP 6219)):
#0  0x00007ffaf15aabad in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffaee0defe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffaee0df0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffae2d541ad in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007ffaee103f05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffaee5ab182 in start_thread (arg=0x7ffae2d41700) at pthread_create.c:312
#6  0x00007ffaf15b7efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 8 (Thread 0x7ffae2277700 (LWP 6220)):
#0  0x00007ffaf15aabad in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffaee0defe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffaee0df30a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffae77cd336 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffaee103f05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffaee5ab182 in start_thread (arg=0x7ffae2277700) at pthread_create.c:312
#6  0x00007ffaf15b7efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 7 (Thread 0x7ffada0c2700 (LWP 6221)):
#0  0x00007ffaf15c5b04 in pthread_mutex_unlock (mutex=0x24db3a0) at forward.c:194
#1  0x00007ffaee1209b1 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffaee0df0f6 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffaee0df129 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffaee103f05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffaee5ab182 in start_thread (arg=0x7ffada0c2700) at pthread_create.c:312
#6  0x00007ffaf15b7efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 6 (Thread 0x7ffad98c1700 (LWP 6225)):
#0  __pthread_mutex_unlock_usercnt (decr=1, mutex=0x7ffac8003e30) at pthread_mutex_unlock.c:69
#1  __GI___pthread_mutex_unlock (mutex=0x7ffac8003e30) at pthread_mutex_unlock.c:310
#2  0x00007ffaee1209b1 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffaee0dea59 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffaee0def7b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffaee0df0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffaf2cea7be in QEventDispatcherGlib::processEvents (this=0x7ffac8001320, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#7  0x00007ffaf2cbc0af in QEventLoop::processEvents (this=this@entry=0x7ffad98c0de0, flags=...) at kernel/qeventloop.cpp:149
#8  0x00007ffaf2cbc3a5 in QEventLoop::exec (this=this@entry=0x7ffad98c0de0, flags=...) at kernel/qeventloop.cpp:204
#9  0x00007ffaf2bb8c5f in QThread::exec (this=this@entry=0x2678f90) at thread/qthread.cpp:537
#10 0x00007ffaf2c9d823 in QInotifyFileSystemWatcherEngine::run (this=0x2678f90) at io/qfilesystemwatcher_inotify.cpp:265
#11 0x00007ffaf2bbb32f in QThreadPrivate::start (arg=0x2678f90) at thread/qthread_unix.cpp:349
#12 0x00007ffaee5ab182 in start_thread (arg=0x7ffad98c1700) at pthread_create.c:312
#13 0x00007ffaf15b7efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 5 (Thread 0x7ffaad0f7700 (LWP 6227)):
#0  0x00007ffaf15aabad in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffaee0defe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffaee0df0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffaf2cea7be in QEventDispatcherGlib::processEvents (this=0x7ffaa80008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#4  0x00007ffaf2cbc0af in QEventLoop::processEvents (this=this@entry=0x7ffaad0f6de0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007ffaf2cbc3a5 in QEventLoop::exec (this=this@entry=0x7ffaad0f6de0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007ffaf2bb8c5f in QThread::exec (this=this@entry=0x2dafd10) at thread/qthread.cpp:537
#7  0x00007ffaf2c9d823 in QInotifyFileSystemWatcherEngine::run (this=0x2dafd10) at io/qfilesystemwatcher_inotify.cpp:265
#8  0x00007ffaf2bbb32f in QThreadPrivate::start (arg=0x2dafd10) at thread/qthread_unix.cpp:349
#9  0x00007ffaee5ab182 in start_thread (arg=0x7ffaad0f7700) at pthread_create.c:312
#10 0x00007ffaf15b7efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7ffaac846700 (LWP 6230)):
#0  0x00007ffaf15af823 in select () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffaf2c9a171 in QProcessManager::run (this=0x7ffaf3024540 <processManager()::processManager>) at io/qprocess_unix.cpp:270
#2  0x00007ffaf2bbb32f in QThreadPrivate::start (arg=0x7ffaf3024540 <processManager()::processManager>) at thread/qthread_unix.cpp:349
#3  0x00007ffaee5ab182 in start_thread (arg=0x7ffaac846700) at pthread_create.c:312
#4  0x00007ffaf15b7efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7ffad90c0700 (LWP 6234)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ffaf2bbb816 in wait (time=18446744073709551615, this=0x3235520) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x2f5fd68, mutex=mutex@entry=0x2f5fd60, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007ffaf2533d96 in QFileInfoGatherer::run (this=0x2f5fd50) at dialogs/qfileinfogatherer.cpp:214
#4  0x00007ffaf2bbb32f in QThreadPrivate::start (arg=0x2f5fd50) at thread/qthread_unix.cpp:349
#5  0x00007ffaee5ab182 in start_thread (arg=0x7ffad90c0700) at pthread_create.c:312
#6  0x00007ffaf15b7efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7ffaa7c41700 (LWP 6235)):
#0  0x00007ffaf15aabad in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffaee0defe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffaee0df0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffaf2cea7be in QEventDispatcherGlib::processEvents (this=0x7ffa9c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#4  0x00007ffaf2cbc0af in QEventLoop::processEvents (this=this@entry=0x7ffaa7c40de0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007ffaf2cbc3a5 in QEventLoop::exec (this=this@entry=0x7ffaa7c40de0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007ffaf2bb8c5f in QThread::exec (this=this@entry=0x2f61360) at thread/qthread.cpp:537
#7  0x00007ffaf2c9d823 in QInotifyFileSystemWatcherEngine::run (this=0x2f61360) at io/qfilesystemwatcher_inotify.cpp:265
#8  0x00007ffaf2bbb32f in QThreadPrivate::start (arg=0x2f61360) at thread/qthread_unix.cpp:349
#9  0x00007ffaee5ab182 in start_thread (arg=0x7ffaa7c41700) at pthread_create.c:312
#10 0x00007ffaf15b7efd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7ffaf4e927c0 (LWP 6218)):
[KCrash Handler]
#6  0x00007ffaf14f3bb9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007ffaf14f6fc8 in __GI_abort () at abort.c:89
#8  0x00007ffaf1530e14 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffaf163f5a8 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#9  0x00007ffaf153d0ee in malloc_printerr (ptr=<optimized out>, str=0x7ffaf163f748 "free(): invalid next size (fast)", action=1) at malloc.c:4996
#10 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#11 0x0000000000501767 in NativeImportBase::~NativeImportBase (this=0x31d6390, __in_chrg=<optimized out>) at ../../umbrello/codeimport/nativeimportbase.cpp:49
#12 0x000000000050a2a9 in CSharpImport::~CSharpImport (this=0x31d6390, __in_chrg=<optimized out>) at ../../umbrello/codeimport/csharp/csharpimport.cpp:51
#13 0x000000000068c8f5 in UMLApp::importFiles (this=this@entry=0x25d1040, fileList=fileList@entry=0x7fffdebf2440) at ../../umbrello/uml.cpp:2570
#14 0x000000000068d0f5 in importFiles (fileList=0x7fffdebf2440, this=0x25d1040) at ../../umbrello/uml.cpp:2561
#15 UMLApp::slotImportProject (this=0x25d1040) at ../../umbrello/uml.cpp:2621
#16 0x00007ffaf2cd187a in QMetaObject::activate (sender=sender@entry=0x264c1d0, m=m@entry=0x7ffaf2b00de0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffdebf25a0) at kernel/qobject.cpp:3539
#17 0x00007ffaf2050a62 in QAction::triggered (this=this@entry=0x264c1d0, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#18 0x00007ffaf2052433 in QAction::activate (this=this@entry=0x264c1d0, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#19 0x00007ffaf2480489 in QMenuPrivate::activateCausedStack (this=this@entry=0x29266d0, causedStack=..., action=action@entry=0x264c1d0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1038
#20 0x00007ffaf24849b9 in QMenuPrivate::activateAction (this=0x29266d0, action=0x264c1d0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1130
#21 0x00007ffaf2488385 in QMenu::mouseReleaseEvent (this=this@entry=0x2925690, e=e@entry=0x7fffdebf2cd0) at widgets/qmenu.cpp:2372
#22 0x00007ffaf3a15665 in KMenu::mouseReleaseEvent (this=0x2925690, e=0x7fffdebf2cd0) at ../../kdeui/widgets/kmenu.cpp:464
#23 0x00007ffaf20a650a in QWidget::event (this=this@entry=0x2925690, event=event@entry=0x7fffdebf2cd0) at kernel/qwidget.cpp:8376
#24 0x00007ffaf24887bb in QMenu::event (this=0x2925690, e=0x7fffdebf2cd0) at widgets/qmenu.cpp:2481
#25 0x00007ffaf2056e2c in QApplicationPrivate::notify_helper (this=this@entry=0x2352110, receiver=receiver@entry=0x2925690, e=e@entry=0x7fffdebf2cd0) at kernel/qapplication.cpp:4567
#26 0x00007ffaf205d5dd in QApplication::notify (this=this@entry=0x7fffdebf34f0, receiver=receiver@entry=0x2925690, e=e@entry=0x7fffdebf2cd0) at kernel/qapplication.cpp:4110
#27 0x00007ffaf395ed1a in KApplication::notify (this=0x7fffdebf34f0, receiver=0x2925690, event=0x7fffdebf2cd0) at ../../kdeui/kernel/kapplication.cpp:311
#28 0x00007ffaf2cbd4dd in QCoreApplication::notifyInternal (this=0x7fffdebf34f0, receiver=receiver@entry=0x2925690, event=event@entry=0x7fffdebf2cd0) at kernel/qcoreapplication.cpp:953
#29 0x00007ffaf205cd93 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#30 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x2925690, event=event@entry=0x7fffdebf2cd0, alienWidget=alienWidget@entry=0x0, nativeWidget=nativeWidget@entry=0x2925690, buttonDown=buttonDown@entry=0x7ffaf2b3c318 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#31 0x00007ffaf20d1cfc in QETWidget::translateMouseEvent (this=this@entry=0x2925690, event=event@entry=0x7fffdebf3020) at kernel/qapplication_x11.cpp:4568
#32 0x00007ffaf20d1269 in QApplication::x11ProcessEvent (this=0x7fffdebf34f0, event=event@entry=0x7fffdebf3020) at kernel/qapplication_x11.cpp:3627
#33 0x00007ffaf20f8b02 in x11EventSourceDispatch (s=0x23496e0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#34 0x00007ffaee0dee04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffaee0df048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007ffaee0df0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007ffaf2cea7a1 in QEventDispatcherGlib::processEvents (this=0x231c8d0, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#38 0x00007ffaf20f8bb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#39 0x00007ffaf2cbc0af in QEventLoop::processEvents (this=this@entry=0x7fffdebf33f0, flags=...) at kernel/qeventloop.cpp:149
#40 0x00007ffaf2cbc3a5 in QEventLoop::exec (this=this@entry=0x7fffdebf33f0, flags=...) at kernel/qeventloop.cpp:204
#41 0x00007ffaf2cc1b79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#42 0x00007ffaf205537c in QApplication::exec () at kernel/qapplication.cpp:3828
#43 0x0000000000438839 in main (argc=<optimized out>, argv=<optimized out>) at ../../umbrello/main.cpp:123
Comment 1 Ralf Habacker 2014-12-19 07:37:07 UTC
The backtrace 
>#8 0x00007ffaf1530e14 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffaf163f5a8 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
>#9 0x00007ffaf153d0ee in malloc_printerr (ptr=<optimized out>, str=0x7ffaf163f748 "free(): invalid next size (fast)", action=1) at malloc.c:4996

indicates a memory corruption somewhere in members storage of class NativeClassImport, but from the backtrace only there is not enough information to get an idea where the root cause may be.

Any chance to recheck a newer version of umbrello ? 

I tried the following public available c# sources with 2.13.3 and got crashes too 

https://subtext.googlecode.com/files/SubText-2.5.2.0.src.zip
http://sourceforge.net/projects/nant/files/nant/0.92/nant-0.92-src.tar.gz/download

but not with 2.14.2.

Another option would be to provide the related sources or, if not possible, a c# test case with which the problem could be reproduced.