Bug 139295 - app hangs after marking a composition line
Summary: app hangs after marking a composition line
Status: RESOLVED WORKSFORME
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-28 00:51 UTC by Peter Möller
Modified: 2007-01-20 18:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Möller 2006-12-28 00:51:12 UTC
Version:           1.5.52 (using KDE 3.5.5 "release 45" , openSUSE 10.2)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.18.2-34-default

Before:
used 2 classes, where class A has 2 attributes of type class B. It results in 2 composition lines.

Clicking on one of the composition lines results in marking the associated text (i.e. the name of the attribute in class A) with 4 blue corner points.

From now on there is no action that can be taken anymore, i have to kill the app.
Comment 1 Oliver Kellogg 2006-12-30 10:32:32 UTC
I don't get the hang - but other bad stuff:
Create two compositions between two classes in the diagram, save, close, open: The second composition does not show up in the diagram. I will fix this first in the hope that it might help with your hang too.
Comment 2 Oliver Kellogg 2006-12-30 10:38:58 UTC
> From now on there is no action that can be taken anymore,
> i have to kill the app.

It would help a lot if you could do the following:
* configure umbrello with --enable-debug=full, make
* run umbrello in gdb
* do the actions that lead to the hang, then
* press Control-C in gdb
* enter "bt" on the gdb command line
* copy/paste the backtrace to this PR
 
Comment 3 Oliver Kellogg 2006-12-31 18:19:01 UTC
SVN commit 618229 by okellogg:

addAssociationInViewAndDoc(): Set the UMLPackage in the UMLAssociation.
Addresses Commment #2.  Might also fix the hang, I can't tell.
CCBUG:139295


 M  +7 -1      toolbarstateassociation.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/toolbarstateassociation.cpp #618228:618229
@@ -19,8 +19,10 @@
 
 // app includes
 #include "assocrules.h"
+#include "association.h"
 #include "associationwidget.h"
 #include "classifierwidget.h"
+#include "folder.h"
 #include "model_utils.h"
 #include "uml.h"
 #include "umlobject.h"
@@ -205,7 +207,11 @@
     // append in view
     if (m_pUMLView->addAssociation(a, false)) {
         // if view went ok, then append in document
-        UMLApp::app()->getDocument()->addAssociation(a->getAssociation());
+        UMLAssociation *umla = a->getAssociation();
+        Uml::Model_Type m = Model_Utils::convert_DT_MT(m_pUMLView->getType());
+        UMLDoc *umldoc = UMLApp::app()->getDocument();
+        umla->setUMLPackage(umldoc->getRootFolder(m));
+        UMLApp::app()->getDocument()->addAssociation(umla);
     } else {
         kError() << "cannot addAssocInViewAndDoc(), deleting" << endl;
         delete a;
Comment 4 Oliver Kellogg 2007-01-01 19:55:34 UTC
Could you try again with r618229?
If I don't hear back then I will close this PR since I could not confirm the reported behavior. Here is what I tried:

* Create two classes is the list view, new_class and new_class_1
* Right click on new_class_1 in the list view, select New->Attribute,
  type "a1 : new_class"
* Right click on new_class_1 in the list view, select New->Attribute,
  type "a2 : new_class"
* Drag both classes to the class diagram area. Two composition lines are shown.
* Click around on one or both lines and/or on the role labels, insert
  line break points, drag one or more objects around on the diagram area.
  No hang happens.
Comment 5 Peter Möller 2007-01-06 00:56:40 UTC
Hi Oliver,

guess it will take a little time, until i know everything (get svn-head, dependencies, build). 

If it is a help for you: Close it. I will open another one, when i did the head- build.
Comment 6 Oliver Kellogg 2007-01-20 18:07:47 UTC
> Comment #5 From Peter Möller 2007-01-06
> I will open another one, when i did the head build.