[crossfire] Java Editor

tchize tchize at myrealbox.com
Tue Jun 7 14:27:39 CDT 2005


Memory leak fixed in CVS. The fix however does only work with 1.5 jvm, there 
seems to be a bug in 1.4 jvm so the InternalFrame used by mapviews is not 
freed even if editor code is not using it anymore and dispose() was called.

Note: this leak was very hard to find out, and i located the problem in a 
surprising part of code, the mapcontrols were used as key to the undo stack 
hashtable. Calls to getInstance(activemap)  on this stack did the offending 
referencing. Those calls were done by refresh of toolbar, so every opened map 
got added there. The stack depth to get there was of 62 (very nice to 
follow). Fixed by using a weakhashmap (weak references does allow garbage 
collecting). 

I wouldn't have found the bad guy if it wasn't for the help of a tool named 
jprofiler. This tool costs a 179euro licence fee for educational. 

Does someone want to make a donation? :D

PS: can someone test with blackdown?

Le Dimanche 05 Juin 2005 20:40, Todd Mitchell a écrit :
>
     
     The current Java Editor does not seem to be very stable.  Especially it
     
     >
     
     tends to have a problem with really big maps (can't open them) and
     
     >
     
     eventually won't open maps and has to be restarted.  Behaves like a
     
     >
     
     Memory leak?  Also sometimes the map window graphics are getting
     
     >
     
     corrupted by the file menus from the main window (something updating the
     
     >
     
     wrong container?)
     
     >
     
     
     >
     
     This is on Debian using Blackdown J2re 1.4.2 and the editor was built
     
     >
     
     from current CVS (a few tries) using ant 1.6.2.  Prior versions worked
     
     >
     
     pretty good on this same platform.
     
     
-- 
--
Tchize (David Delbecq)
     
     tchize at myrealbox.com
     
     
Public PGP KEY FINGERPRINT:
    F4BC EF69 54CC F2B5 4621  8DAF 1C71 8E6B 5436 C17C
Public PGP KEY location:
    
     
     http://wwwkeys.pgp.net/pgpnet/wwwkeys.html
     
     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 
     
     http://shadowknight.real-time.com/pipermail/crossfire/attachments/20050607/1f2a36f9/attachment.pgp
     
     
    


More information about the crossfire mailing list