After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 325151 - 100% cpu in uml_create_documentation_tag()
100% cpu in uml_create_documentation_tag()
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: objects
CVS head
Other Windows
: Normal critical
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-28 15:35 UTC by Hans Breuer
Modified: 2005-12-31 10:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A diagram with class comments (81.49 KB, text/plain)
2005-12-28 15:38 UTC, Hans Breuer
  Details
Should fix the problem with the wrapping of comments in older diagrams (707 bytes, patch)
2005-12-29 02:28 UTC, dave Klotzbach
none Details | Review
cvs diff -u > bug325151.diff (2.01 KB, patch)
2005-12-30 22:16 UTC, Hans Breuer
committed Details | Review

Description Hans Breuer 2005-12-28 15:35:51 UTC
The line wrapping code from http://bugzilla.gnome.org/show_bug.cgi?id=303744
has issues. When loading an old diagram it gets passed a "WrapCount" of 0
and does not recover from its wrapping loop. Sample diagram to reproduce
follows.
Comment 1 Hans Breuer 2005-12-28 15:38:24 UTC
Created attachment 56472 [details]
A diagram with class comments
Comment 2 dave Klotzbach 2005-12-29 02:25:06 UTC
Sorry about that, I was under the impression that I had handled that by initializing the WrapPoint to a minimum of 17 characters(the size of the documentation = string. But apparently this code does not get executed when the file is read in. Thanks for finding this. Obviously by the time I got around to testing it I no longer had any diagrams without a comment length setting in it and didn't think to try the combination.
Comment 3 dave Klotzbach 2005-12-29 02:28:29 UTC
Created attachment 56494 [details] [review]
Should fix the problem with the wrapping of comments in older diagrams

This change makes sure that the wrap point for comments is at least as long as the {Documentation = tag.
Comment 4 Hans Breuer 2005-12-30 22:16:55 UTC
Created attachment 56566 [details] [review]
cvs diff -u >  bug325151.diff

Attached the patch how we would have liked it:
With CangeLog entry and 'diff -u'. I've applied
it now although I'm not completely happy with the 
feature the endless loop seems gone. 
At least it (i.e. the superfluous 
'documentation =' prefix) breaks diagram compatibility.
You may want to compare the diagram from above with the
diagram from the UML spec 1.5, page 286
http://www.omg.org/cgi-bin/apps/doc?formal/03-03-01.pdf
Comment 5 Hans Breuer 2005-12-30 22:26:03 UTC
Wow! With a unified diff the new bugzilla is really nice. Follow
http://bugzilla.gnome.org/attachment.cgi?id=56566&action=diff
[the Diff link under actions]
Comment 6 dave Klotzbach 2005-12-31 02:09:20 UTC
The diagram on page 286 is displaying several classes selected from various packages. The notation, which has been entered as a comment in the attached diagram, is not a comment at all. It is a notation which indicates the package which contains/owns the class/element being displayed.
I have been using UML from very early on, and while I have seen this notation use in the specifications, and seen it used in many tools, I have never seen it explained or described in any of the specification!
However documentation is defined as a tagged value of an element. See page 91 of the referenced document. "Documentation is a comment, description, or explanation of the element to which it is attached."
As you probably already know the element is the MetaClass for all of UML. So the documentation for an element (Class, Attribute, Operation, Association ...) is a tagged value and can be displayed in the diagram as such. 
The proper display of a tagged '{' <tag name> '=' <tag value> '}'. So the 'documentation =' prefix is not superfluous as you may think. It is actually proper for displaying documentation.
Free form documentation can be added to a diagram by using a "Note". 
In fact if the UML ever gets to the point where it is truely 1.5 compliant and then can be extended to be 2.0 compliant, the documentation tagged value may have to be removed as I can't find any reference to this in the 2.0 specification.
Comment 7 Hans Breuer 2005-12-31 10:58:02 UTC
I'm not questioning the use of tags in UML. But your implementation
does *enforce* a visual representation which IMO should be optional.
Thus the reference to a diagram redrawn from the UML specification
1.5 - which is not possible at all anymore with your addition.

OTOH with not hard-coded document tag both reperesentations
would be possible. The user can always write the extra 
{ documentation = ... } in the comment field.