Bug 112466 - C++import: Excessive memory usage and then impossible to use
Summary: C++import: Excessive memory usage and then impossible to use
Status: RESOLVED WORKSFORME
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 1.4.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
: 129772 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-12 12:13 UTC by paolo achdjian
Modified: 2012-06-26 05:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
example C++ header which makes Umbrello freeze on import (14.04 KB, text/x-c++hdr)
2006-03-22 07:54 UTC, Oliver Kellogg
Details
corrected sample header file that demonstrates other problems (14.04 KB, text/x-c++hdr)
2006-09-10 19:43 UTC, Oliver Kellogg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description paolo achdjian 2005-09-12 12:13:20 UTC
Version:           1.4.2 (using KDE KDE 3.4.2)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
 
OS:                Linux

I imported  the gpsim project (a free PIC (simple CPU) simulator written in C++).
Also if I delete all the useless  data type that it creates, Umbrello uses so much memory that if I enable the undo feature, every modify in a diagram requires about 30 seconds.
I can use it only disable the Undo and Autosave features, but saving the project require about 15 minuts because it continues to swap.

My computer is a notebook IBM R50 with Pentium M 1400 Mhz and 256 MBytes.

If you want, I can pass you my project to test it.
Comment 1 Oliver Kellogg 2005-09-12 19:49:02 UTC
> Also if I delete all the useless  data type that it creates,
> Umbrello uses so much memory that if I enable the undo feature,
> every modify in a diagram requires about 30 seconds.

Useless data types? Please give an example.
Chances are they _aren't_ useless because they are referenced from
somewhere in the imported code (for example, as a parameter or return
type of an operation.) In fact, Umbrello should not permit deleting
them in the first place because that will most probably leave pointers
dangling. (In other words, Umbrello does not yet properly support
deletion of objects that are still referenced somewhere in the model.)

> I can use it only disable the Undo and Autosave features, but saving
> the project require about 15 minuts because it continues to swap. 
 
Does it also take that long when you disable the use of the new code
generators (in the Configure Umbrello dialog) ?
Comment 2 paolo achdjian 2005-09-13 12:54:18 UTC
I noted that for every pointer (and perhaps for every reference) to a class, Umbrello produces a  new data type, doubling the number of objects that Umbrello must manage.
In the code that I imported, the class often have pointer to others class as member so I think I can delete them without problem if not ot have the type member undefined.
For me, these data are useless because  they don't preserve the meaning so I prefer delete it for save memory.


Isn't clear at me why disabling the new code generators should speed up the saving. In any way, starting from a just open session, I disabled this option but the saving is always slow.

Comment 3 Oliver Kellogg 2006-03-22 07:54:04 UTC
Created attachment 15256 [details]
example C++ header which makes Umbrello freeze on import
Comment 4 Vincent Ricard 2006-09-10 16:46:01 UTC
No freeze here with my svn version (r582788).
The classes have been imported, then i could drag them in the diagram...
Comment 5 Oliver Kellogg 2006-09-10 19:43:43 UTC
Created attachment 17694 [details]
corrected sample header file that demonstrates other problems

You're right, it no longer freezes - but demonstrates
some other errors. On the console, there are messages like

umbrello: ERROR: findUMLObject(T): breaking out of cycle involving Node
umbrello: ERROR: findUMLObject(T): breaking out of cycle involving Node
umbrello: ERROR: findUMLObject(Node*): breaking out of cycle involving Node
umbrello: ERROR: findUMLObject(iterator): breaking out of cycle involving
RedBlackTree

The cycle-breaking logic just avoids the crash but cycles should not occur
in the first place. Something is wrong with the way references to names are
being resolved.
Comment 6 Oliver Kellogg 2007-02-08 07:19:54 UTC
*** Bug 129772 has been marked as a duplicate of this bug. ***
Comment 7 Ralf Habacker 2012-06-26 05:21:24 UTC
The mentioned message do not appear in recent trunk or 4.9 release.