Summary: | Crash when copying actor of use case to collaboration diagram | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | robin007bond |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | ralf.habacker |
Priority: | NOR | ||
Version: | 2.15.3 (KDE Applications 14.12.3) | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/umbrello/5a05d35e2e809899b2f65bea9fb44681042d10f8 | Version Fixed In: |
Description
robin007bond
2015-03-27 12:12:33 UTC
After 5) I need to click into the diagram to trigger the crash. Pasting code is performed by the following methods: 0 UMLClipboard::checkPasteWidgets umlclipboard.cpp 771 0x49ed60 1 UMLClipboard::pasteClip4 umlclipboard.cpp 529 0x4a0074 2 UMLClipboard::paste umlclipboard.cpp 211 0x4a101b 3 UMLApp::slotEditPaste uml.cpp 1566 0x63e851 The problem here is, that UMLClipboard::checkPasteWidgets() deletes the widget, while UMLDragData::decodeClip4(), which is called from pasteClip4(), already added the widget to the scene widget list. Accessing afterwards the scene's widget list returns a dangled widget pointer and result into the crash. A workaround is to drag and drop the actor from the tree view into the collaboration diagram. Git commit 66ed34766b015c56a4f1ed880d614a9127c44697 by Ralf Habacker. Committed on 08/05/2015 at 07:50. Pushed by habacker into branch 'Applications/15.04'. Refactor code checking valid uml object type for a given diagram type into a new function Moodel_Utils::typeIsAllowedInDiagram(). This makes the function callable from different locations. M +79 -0 umbrello/model_utils.cpp M +1 -0 umbrello/model_utils.h M +1 -65 umbrello/umlscene.cpp http://commits.kde.org/umbrello/66ed34766b015c56a4f1ed880d614a9127c44697 Git commit 5a05d35e2e809899b2f65bea9fb44681042d10f8 by Ralf Habacker. Committed on 08/05/2015 at 07:58. Pushed by habacker into branch 'Applications/15.04'. Fix 'Crash when copying actor of use case to collaboration diagram'. The crash happened by accessing deleted widgets in the scene widget list; the bug is fixed by excluding invalid uml objects and widget in UMLDragData::decodeClip4() before any widget is added to the scene. M +0 -47 umbrello/clipboard/umlclipboard.cpp M +0 -2 umbrello/clipboard/umlclipboard.h M +22 -0 umbrello/clipboard/umldragdata.cpp M +46 -0 umbrello/model_utils.cpp M +1 -0 umbrello/model_utils.h http://commits.kde.org/umbrello/5a05d35e2e809899b2f65bea9fb44681042d10f8 |