moonlight lib causing java heap crash
ianm1647 opened this issue ยท 44 comments
Minecraft version: 1.19.2
Moonlight lib version: 2.1.15
moonlight lib is causing a java heap crash with my set of mods, i will provide the crash log here
everytime i join a world and sit there for a while, leave the world and try to rejoin. the game crashes with a java heap error
after removing moonlight lib and all of its dependents (every compat, snowy spirit, supplementaries and vertical slab compat), the crash doesn't happen anymore.
i have no idea if this is a conflict issue with another mod in the list but it just seems to be moonlight lib filling up the log.
if you know how i can resolve this on my side lmk, unless its just a thing you need to do on the development side of things.
Increase ram? Every compat can register a lot of blocks which need resources. Of course it's going to use less if you remove mods
Increase ram? Every compat can register a lot of blocks which need resources. Of course it's going to use less if you remove mods
i was watching my ram usage the entire time , considering i have the max allocation at 8192 mb , which is more than plenty.
my usage sat at 50% the entire time, so i have no idea what could be causing it. i can try increasing ram to see if thats the problem. i will return if the problem persists
ran the modpack with 10240 allocated and the problem persisted
edit: after even more testing , i decided to run the pack without every compat and the problem is still persisting
seems as if moonlight lib is still the culprit here
- load into a world
- wait (if you want to speed the process up , just do /reload 3 or 4 times, maybe more depending on how many mods you have loaded)
- leave world
- try and rejoin
edit: as you reload have the f3 screen open, you'll see the ram usage increase with every reload, not going back down
i can recreate this with all of the dependent mods i listed (ec, slab compat, supplementaries, snowy spirit)
Let me know if it is fixed for you
it seems i closed it too soon, the leak is still somehow happening
its still only occuring with vertical slab compat
okay sounds great! thank you for helping out and im glad to have helped you in the process
so a little side note: if you give the game too much ram the java garbage collector will get lazy so it will let the game grab more and only really start cleaning stuff when getting closer to the limit
i cant replicate. heres what i did:
- load up a world with just the mod
- wait a bit and /reload many times
- re enter the world and try again
in all this the reload command didnt increase ram at all.
re entering did but only noticeably the first time. overall the memory would consistently stay between 3 and 3.5 GB, most of the times at 3.3. thi was done with default memory settings
im still confused as to how im having this problem then, because the games memory usage is stable around 3.5 gb for the majority of the time whenever i DONT have moonlight lib, but once i add moonlight lib into the mix it changes things completely. albeit im running around 250 mods working on a modpack, but still the only thing that ive ran into that causes problems is moonlight lib.
i also disabled the main mod entry point and run the game, effectively
without it and got similar results
how much ram i it increasing? Thing is the only active thing the mod does on its own is detect wood types and colors my making a map with those blocks. This happens once at boot
every time i reload, the % usage goes up by around 10% each time i run the command
the testing i did was with the ones i had listed, i can run it again with just moonlight lib and see
if its an issue its with one of the mods. as ive said this pretty much does nothing on its own but of course removing it will also require removing my other mods so if theres an issue it will be noticeable
it appears to have stopped happening with just moonlight lib alone, so now it just comes down to process of elimination
did you test every compat too? maybe its something with the tag generation. if that was the case however i would expect EC to be way more noticeable as it can potentiallly register an absurd amount of blocks depending on the pack
did you test every compat too? maybe its something with the tag generation. if that was the case however i would expect EC to be way more noticeable as it can potentiallly register an absurd amount of blocks depending on the pack
every compat seems to be working just fine for me, the problem is gone now that vertical slab compat isnt present
i have every compat running with mrcrayfish furniture, biomes o plenty, quark, and decorational blocks and nothing bad is happening
i can say every compat does exponentially increase memory usage by about 20% but it doesnt slowly increase the usage as vertical slabs does
I found it too. I'm trying to figure out what's going on. It seems inconsistent as it only happens on some realoads but there definitely is a memory leak. Furthermore I believe it only happens here for total chance as tags were eroneously getting generated on each reload unlike on EC where its only at startup. Lucky coincidence otherwise it would have gone unnoticed as even there in EC they still leak some resource even if just once
well I found 2 issues actually. One that would potentially leak resources (a tag json) and the other which would just make a tag grow exponentially after every reload as it would just add stuff to it. Seems to explain it as the first alone would be negligible and the second wouldnt not be noticeable at all on its own
I'm uploading a new moonlight verstion (the tag generation code is in here). Could you test it?
i have to say i could replicate it consistently before. only took 10 reloads or so. now with the version i posted memory stays constant and noticeably lower so idk
another noticeable thing with the new moonlight version seems to be the localized names for all of the every compat items dont seem to be loading. not sure if you do that through moonlight or not but the names have disappeared
edit: could just be something on my side, but probably not considering i havent changed anything
i have to say i could replicate it consistently before. only took 10 reloads or so. now with the version i posted memory stays constant and noticeably lower so idk
all i know is that in the modpack its still leaking, i'll try individually again
Try with the vertical slabs version I just posted
it still hasn't gone through yet for me
seams as if its still leaking somewhere, just not as fast , but its still noticeable
was this with newest vertical slabs mod?
it was with the newest versions for both moonlight and vertical slabs