The JME3 memory bug

Hello Forum !

I think I found something that could help you solve the problem of memory crash that I get.

I noticed that sometime JME3 would give an out of memory error. When this happened, everything would get really slow and id have to close and restart the application. Often, when I retarted the application i would get a class not found error that would be fixed by refactoring to class name and setting it back again.

I noticed that this would only happens when I had like 30+ pages open, I hope this helps. I don’t know how JME3 works in the background, but maybe if you limit code checking to the last 10-15 opened pages this would not occur.

My program already has 21 packages containing 106 classes total. If I dont keep an eye on how many pages are in the open tab it always ends up getting really slow, just a matter of how many times I run my application.

I think I can run my game up to 15-20 times before I get an outofmemory exception. I do this when I get annoying bugs and have to run it many times to see whats going on.

Thanks in advance

Eric

You can disable the background scanning in the application preferences and also try deleting the temp folder (see the link to the troubleshooting page on the right ->). Mostly these issues have something to do with messed up access rights in either your project folder or the settings folder of the SDK (e.g. when you run applications “as administrator” often on windows). You can also raise the memory limits for the SDK in the config file (see troubleshooting page again). Also make sure what kind of memory issue you have as models and textures use a different kind of memory (direct memory) that java has a harder time of tracking. The application being run uses a separate memory space by the way so it shouldn’t really influence the amount of memory that the SDK uses.

1 Like

Note: the default SDK memory settings are like 2 gig or something (last time I checked)… which if you are running on a 32 bit platform is completely ignored and drops the SDK back down to the 256 meg limit. So definitely check the settings and especially if you are on a 32 bit platform.

Otherwise, my recommendation is also to occasionally close the tabs you aren’t using. Every editor or IDE I’ve ever used eventually starts to behave badly when you have too many files open. So it’s just a good habit to get into.

1 Like

Thanks guys !