GTNewHorizons / Angelica

OptiFine replacement for 1.7.10
Other
243 stars 43 forks source link

Game freezes while JVM performing Garbage Collect #579

Closed Eticeweng closed 1 month ago

Eticeweng commented 1 month ago

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 7a4bb4c69b172f659d06ca6313c6c0ab_0

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

image

image

Mod List or GTNH Pack Version

GTNH 2.6.1

Final Checklist

mitchej123 commented 1 month ago

Can you run the memory sampler from visualvm/intellij/yourkit/etc and provide some insight as to what is causing the excess allocations?

Eticeweng commented 1 month ago

the snapshot is here image 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

Eticeweng commented 1 month ago

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.

Akashiic commented 2 weeks ago

I have the same problem, my FPS rate goes over 100, but the lag spikes are constant and I use Java 8