Bug 327491

Summary: Crash when closing Umbrello after pasting a class
Product: [Applications] umbrello Reporter: Joris Steyn <kde>
Component: generalAssignee: Joris Steyn <kde>
Status: RESOLVED FIXED    
Severity: normal CC: ralf.habacker
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.12.0

Description Joris Steyn 2013-11-12 12:22:36 UTC
Umbrello crashes in the cleanup-phase (application close or loading a different file) if the user pasted a class containing one or more attributes.



Reproducible: Always

Steps to Reproduce:
1. Create a new class in the Logical View
2. Add an attribute to the new class
3. Copy the class in the tree view
4. Paste the class in the tree view
5. Close Umbrello (or load another file)
Actual Results:  
A SIGSEGV is received and the crash handler kicks in.

Expected Results:  
The application should cleanup correctly and close without errors.

The memory violation occurs in the destructor of CodeClassField, relevant part of stack trace:

Application: Umbrello UML Modeller (umbrello), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[KCrash Handler]
#5  0x0000000000584257 in CodeClassField::~CodeClassField (this=0x1616e80, __in_chrg=<optimized out>) at umbrello/umbrello/codegenerators/codeclassfield.cpp:57
#6  0x00000000005b96dd in CPPCodeClassField::~CPPCodeClassField (this=0x1616e80, __in_chrg=<optimized out>) at umbrello/umbrello/codegenerators/cpp/cppcodeclassfield.cpp:35
#7  0x00000000005b970c in CPPCodeClassField::~CPPCodeClassField (this=0x1616e80, __in_chrg=<optimized out>) at umbrello/umbrello/codegenerators/cpp/cppcodeclassfield.cpp:37
#8  0x00007fe388602438 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#9  0x00007fe3886049df in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#10 0x0000000000790746 in UMLObject::~UMLObject (this=0x1672460, __in_chrg=<optimized out>) at umbrello/umbrello/umlobject.cpp:89
#11 0x00000000006fd391 in UMLClassifierListItem::~UMLClassifierListItem (this=0x1672460, __in_chrg=<optimized out>) at umbrello/umbrello/classifierlistitem.cpp:69
#12 0x00000000006e8770 in UMLAttribute::~UMLAttribute (this=0x1672460, __in_chrg=<optimized out>) at umbrello/umbrello/attribute.cpp:67
#13 0x00000000006e87c0 in UMLAttribute::~UMLAttribute (this=0x1672460, __in_chrg=<optimized out>) at umbrello/umbrello/attribute.cpp:69
#14 0x00007fe388602438 in QObjectPrivate::deleteChildren() () from /usr/lib/libQtCore.so.4
#15 0x00007fe3886049df in QObject::~QObject() () from /usr/lib/libQtCore.so.4
#16 0x0000000000790746 in UMLObject::~UMLObject (this=0x15bc570, __in_chrg=<optimized out>) at umbrello/umbrello/umlobject.cpp:89
#17 0x000000000075eb36 in UMLCanvasObject::~UMLCanvasObject (this=0x15bc570, __in_chrg=<optimized out>) at umbrello/umbrello/umlcanvasobject.cpp:45
#18 0x000000000073922c in UMLPackage::~UMLPackage (this=0x15bc570, __in_chrg=<optimized out>) at umbrello/umbrello/package.cpp:45
#19 0x00000000006ede7b in UMLClassifier::~UMLClassifier (this=0x15bc570, __in_chrg=<optimized out>) at umbrello/umbrello/classifier.cpp:73
#20 0x00000000006edeaa in UMLClassifier::~UMLClassifier (this=0x15bc570, __in_chrg=<optimized out>) at umbrello/umbrello/classifier.cpp:75
#21 0x00007fe388603f38 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
...