Memory leak?

Hi guys,

I’m using the SDK Alpha 4 under Win7 64 bit. I believe my JRE is a 64 bit JRE too. Anyway, after debugging a few times I notice that memory usage of the javaw.exe process increases to about 700MB. As soon as I restart the SDK, its fine again. The memory indicator at the top of the SDK starts at about 200MB and heads towards 450MB. At that point, the SDK is too slow to use and I need to restart it.

Can anyone suggest a good way to trouble shoot this so that I have more information? I mean, the problem could lie in the 64 bit JRE itself for all I know.

The project scanning in the background can take quite some amount of memory when the project is large. You can disable some of the scanning or for me it also works when I just let it finish the scanning from time to time, not doing more changes to the source code (which halts and retriggers scanning, using even more mem). Have you installed any extra plugins in the SDK?

Nope, no extra plugins. Surely the scanning shouldnt cause memory usage to go up and up and up?

As I said, when you make more changes to the code the changes and scanning is suspended, then started again with the old data plus changes. When you type away again, you have old data plus changes plus changes… etc… When the IDE gets slow you see the memory fill and then be garbage collected again, during which the IDE is shortly freezing/slow. Let the IDE finish the work until the mem doesn’t go up/down anymore, then continue. If you cant get it to stop at all, go to Preferences → Editor → Hints and disable all or most hints.

Actually did you check with jvisualvm or similar if the 700 is used ?

Java tends to not free once used heapspace or short it might only use 5 mb but if it was once 700 it will stay at 700

Oh lol, you actually looked at the javaw memory ^^ Yeah, that never goes down once its up. Look in the “memory” graph up in the SDK to see how much of that memory is actually used at that moment. If your computer has too few ram for the IDE then try lowering the maximum used ram in (Application_Folder)/jmonkeyplatform/etc/jmonkeyplatform.conf