Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutOfMemoryException in certain versions of Java. #10

Open
Kneesnap opened this issue Jan 6, 2020 · 5 comments
Open

OutOfMemoryException in certain versions of Java. #10

Kneesnap opened this issue Jan 6, 2020 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Kneesnap
Copy link
Owner

Kneesnap commented Jan 6, 2020

For some reason, certain versions of Java run into issues displaying the map viewer and saving the MWD.

Working Versions: 1.8.0_111, 1.8.0_144, 1.8.0_172, and 1.8.0_181
Not Working Versions: 1.8.0_161, 1.8.0_201, and 1.8.0_231

TextureTree is pretty memory intensive, but I'm not sure why the different java version causes issues or not. We should probably attempt to reduce memory usage by a bit, but also look into why different java versions may cause this issue.

Some setups seem to be able to save properly, others seem to just break upon doing things like opening maps.

Setups:
1.8.0_231-b11 with 247MB Total, 247MB Max - Does not save. (Desktop, RexyWood, 4GB)
1.8.0_144-b01 with 476MB Total, 3GB Max - Works fine. (Desktop, Mine, 16GB)
1.8.0_111-b14 with ?MB Total ? - Does not save, Cannot open maps. (Desktop, Kao, ?)

@Kneesnap Kneesnap added bug Something isn't working help wanted Extra attention is needed labels Jan 6, 2020
@Kneesnap
Copy link
Owner Author

It appears there's a memory leak. If you load a map, it keeps that MapMesh loaded in memory even after exiting. Honestly, I've looked pretty hard for the source of the leak, and I can't find it. I'm thinking that maybe it's possible the UI components themselves are either loaded indirectly by JavaFX, or directly by us, but YourKit won't seem to give me information on what is referencing the MapMeshes.

@Kneesnap
Copy link
Owner Author

I cleared everything, stuff was still kept in memory. I think we're going to somehow have to workaround the problem, which seems most likely to be related to JavaFX

@Kneesnap
Copy link
Owner Author

This should be better improved now, since the memory leaks are gone. We still need to do further research on why this happens on certain Java versions when saving though. I'll see if Kao is willing to help profile the issue.

@sylv256
Copy link
Contributor

sylv256 commented Mar 18, 2020

May I also add that Java 1.8.0_131 works as well?

@Kneesnap
Copy link
Owner Author

Kneesnap commented Feb 8, 2021

This needs testing after the new PP20 packer. @andyeder can you read your discord DMs when you get a chance? It regards testing this + some other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants