
Game freezes while JVM performing Garbage Collect
Eticeweng opened this issue ยท 4 comments
Your GTNH Discord Username
No response
Mod Version
1.0.0-beta2
Java Version
Java 21
Graphics Card Vendor
NVidia
Bug Report
The world is running on a dedicated sever, freezing happened on Client
the game freezes while JVM performing GC, lasts for seconds
the problem solved by removing Angelica
freezing seems relieved on rolling back Angelica to alpha-50
Also, using ZGC (adding the following parameter) on JVM help solved the freezing problem, making the game no longer freezed on GC action, but will still freezes and GT machines lost their texture on loading(or rendering?) a lots of chunk scenario like using warp
or home
command to teleport
-XX:+UseZGC -XX:+ZGenerational
Mod List or GTNH Pack Version
GTNH 2.6.1
Final Checklist
- I have searched the issues and haven't found a similar issue.
- I have read the known incompatibilities and this is not related to one of those.
- I am running an officially released version. (Or, if I've compiled it myself I plan to fix the issue)
- This issue is not related to a feature that is disabed by default - Shaders, MCPF, etc. [They'll be enabled when they're ready for testing]
Can you run the memory sampler from visualvm/intellij/yourkit/etc and provide some insight as to what is causing the excess allocations?
the snapshot is here
the game crashed once I stop the profiler and start to collecting data, and this is what I got from the .jfr
file it left behind
https://drive.google.com/file/d/1DiI4P4auDSppcbYMboICUA3hvVrU7_fM/view?usp=sharing
visualVM also shows the almost same call tree above, is also under the EntityRenderer
if there is anymore info needed just let me know
update:
as a workaround, switching to Java8 and rolling back to angelica-beta-50
and gtnhlib-0.2.11
seems fix most of the problem except some random freeze(fps drops to 0) still occur with no reason every 20-40 minutes, but is more playable now compare to heavy stuttering while walking through the base and freezes every 1-2 minutes.
so I am closing the issue now due to the problem seems relieved and the source of the problem is hard to trace.