[Uml-devel] Fix bug during load of document

Achim Spangler Achim.Spangler at mnet-online.de
Fri Mar 26 06:46:06 UTC 2004

the changes of Oliver at "2004-03-23 05:05" in the method 
UMLDoc::deleteContents() caused severe problems during load of my project 
file. The memory usage exploded and the load never reached final state. 
( It's a big project ).

I found the reason:
There are several functions in umldoc.cpp , where the attribute m_bLoading is 
temperarely set to true for some actions. 

The bug is, that the previous value of m_bLoading is _not_ restored - the 
value is simply set to FALSE.

As the previous version of UMLDoc::openDocument() sets "m_bLoading = true;" 
_before_ the call of deleteContents(); , the opening process of the document 
is running with the _wrong_ attribute setting ( m_bLoading == false during 
load of document ).

The attached diff, changes the following:
+ the original value of m_bLoading is saved before
   each temporarely change, so that the original value
   is restored ( and not simply set to false )
+  "m_bLoading = true;" is moved in UMLDoc::openDocument() after
   the call of deleteContents()

The diff is created with parameters "diff -u -d -r1" -> please tell me the 
preferred setting, if my usage of diff is not optimal.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixLoadBug.diff.gz
Type: application/x-gzip
Size: 1145 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20040326/241a6249/attachment.gz>

More information about the umbrello-devel mailing list