Bug 321533 - adding containment relation between packages on class diagram doesn't complete. hangs session. have to kill umbrello.
Summary: adding containment relation between packages on class diagram doesn't complet...
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-23 15:59 UTC by azdflora
Modified: 2015-04-17 21:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.15.90 (KDE Applications 15.03.90)


Attachments
A patch which fixes the hang and replaces it with an alert box! (1.77 KB, patch)
2013-07-17 04:41 UTC, Luke San Antonio
Details
Fixed the comments and a grammar mistake in the original patch which fixes up a crash. (1.76 KB, patch)
2013-07-17 04:48 UTC, Luke San Antonio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description azdflora 2013-06-23 15:59:24 UTC
I deleted a containment relation between two packages when the representing line had too many kinks in it. I then tried to manually add the relation. The modal operation of adding the line doesn't complete, ie it hangs my modelling session and I have to kill Umbrello. On deleting with System Monitor app, I noticed that the Umbrello entry was obviously grabbing a lot of CPU.


Reproducible: Always

Steps to Reproduce:
1. Create a package containing a package in Views-> Logical View tree item
2. Display in a class diagram by dragging from tree view.
3. Follow the above description of the problem
Comment 1 Luke San Antonio 2013-07-16 18:31:45 UTC
Umbrello hangs for me only when the containment relation would basically contradict the inheritance in Views -> Logical View, Not otherwise.

What I mean is that if I have two packages, top and bottom, where bottom is the child of top,  Umbrello only hangs if I make a containment relation which implies that top is actually the child of bottom (i.e. I clicked on bottom first, then top). Is this what you are talking about?

I'm guessing this information would make the bug more specific, which might help debugging. I don't know...
 - Luke
Comment 2 Luke San Antonio 2013-07-17 03:36:16 UTC
I'm wondering what the expected behavior of this action should be. What do you think?

I guess I can't decide between the "Incorrect use of associations" alert, or basically just switching relationship (parent becomes child, child becomes parent).

I can see both. However switching relationship seems kind of premature, and suspicious. But an alert could be preventing the user from, indeed, switching relationship. Although, if that's the case the user could use the properties and manually change the parent, etc. That's probably the better option, I think, since the user probably contradicted the tree view by accident.

Is this all making sense to you? I'm kind of rambling...

I'm working on a patch by the way!
 - Luke
Comment 3 Luke San Antonio 2013-07-17 04:41:02 UTC
Created attachment 81150 [details]
A patch which fixes the hang and replaces it with an alert box!

Here's the patch!

When the program detects that a child is trying to contain it's parent, the action is stopped and the dreaded text "Incorrect use of associations" appears.

I'd be great if you could apply this patch and tell me if it works for you.
Good luck!
- Luke
Comment 4 Luke San Antonio 2013-07-17 04:48:35 UTC
Created attachment 81151 [details]
Fixed the comments and a grammar mistake in the original patch which fixes up a crash.

Woops, I made a grammatical error in the first patch, using it's instead of its.

I know, It's unnecessary, but I also made the other comments more serious and understandable...

Anyway use this new patch! =D
-Luke
Comment 5 Ralf Habacker 2015-03-06 23:24:19 UTC
Git commit 6ec64a7de14d0f3a227f6bc30182083417a65af5 by Ralf Habacker, on behalf of Luke San Antonio.
Committed on 17/07/2013 at 04:32.
Pushed by habacker into branch 'Applications/15.04'.

Specifically prohibited the mutual containment of a parent UMLListViewItem by a child UMLListViewItem.

This prevents a freeze and an eventual crash from the recursive calling of UMLListViewItem::deepCopy.
from the recursive calling of UMLListViewItem::deepCopy.
FIXED-IN:2.15.85 (KDE 15.03.85)

M  +15   -0    umbrello/assocrules.cpp

http://commits.kde.org/umbrello/6ec64a7de14d0f3a227f6bc30182083417a65af5