Bug 154233 - New Class Wizard crashes
Summary: New Class Wizard crashes
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-17 16:35 UTC by kaido kert
Modified: 2009-05-26 16:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kaido kert 2007-12-17 16:35:29 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
Compiler:          gcc 4.1.2 
OS:                Linux

Im on ubuntu feisty, apt-get umbrello, start it with empty sheet, click new class wizard, next next finish and bang, crash.

Crash happens after pressing "Finish" button.

i rebuilt it with DEB_BUILD_OPTIONS=nostrip sudo apt-get -b umbrello, and tracked it down to this debugsession:

(gdb) break UMLDoc::currentRoot
(gdb) run
Breakpoint 1, UMLDoc::currentRoot (this=0x8423518) at /usr/src/kdesdk-3.5.6/./umbrello/umbrello/umldoc.cpp:1110
1110    UMLFolder *UMLDoc::currentRoot() {
(gdb) next
1111        UMLView *currentView = UMLApp::app()->getCurrentView();
(gdb) next
1112        if (currentView == NULL) {
(gdb) next
1119        UMLFolder *f = currentView->getFolder();
(gdb) next
1120        while (f) {
(gdb) next
1121            f = static_cast<UMLFolder*>(f->getUMLPackage());
(gdb) next
1120        while (f) {
(gdb) next
1124    }
(gdb) next
UMLDoc::addUMLObject (this=0x8423518, object=0x8564b38) at /usr/src/kdesdk-3.5.6/./umbrello/umbrello/umldoc.cpp:736
736                 << "): no parent package set, assuming " << pkg->getName() << endl;
(gdb) print pkg
$3 = (UMLPackage *) 0x0
(gdb) next
734             pkg = currentRoot();
(gdb) next
736                 << "): no parent package set, assuming " << pkg->getName() << endl;
(gdb) next

Program received signal SIGSEGV, Segmentation fault.
0xb7aea173 in QString::QString () from /usr/lib/libqt-mt.so.3
(gdb) bt
#0  0xb7aea173 in QString::QString () from /usr/lib/libqt-mt.so.3
#1  0x0813d91c in UMLObject::getName (this=0x0) at /usr/src/kdesdk-3.5.6/./umbrello/umbrello/umlobject.cpp:106
#2  0x081854a9 in UMLDoc::addUMLObject (this=0x8423518, object=0x8564b38) at /usr/src/kdesdk-3.5.6/./umbrello/umbrello/umldoc.cpp:736
#3  0x0828d1b2 in ClassWizard::accept (this=0xbfafe3dc) at /usr/src/kdesdk-3.5.6/./umbrello/umbrello/dialogs/classwizard.cpp:93
#4  0xb7b8d732 in QDialog::qt_invoke () from /usr/lib/libqt-mt.so.3
#5  0xb7b91c5d in QWizard::qt_invoke () from /usr/lib/libqt-mt.so.3
....

So in UMLDoc::addUMLObject, currentRoot returns NULL for pkg and its methods are called immediately afterwards. I dont know what is the correct behaviour here, apparently currentRoot is not expected to return NULL ever but it does, and the code in it definitely allows it ( no assert anywhere )
Comment 1 Andi Fischer 2009-05-26 16:06:57 UTC
Class wizard was ported to KDE4 and fixed.