Game exits without crash when using CWSM
Cod1ngGamer opened this issue ยท 4 comments
Bug Description
When using this mod with Cracker's Wither Storm Mod (https://modrinth.com/mod/crackers-wither-storm-mod) worlds load up in a very strange way. Then, once the wither storm has existed for a few seconds, the game exits. Here's the really weird part: The game closes as if the quit button was pressed. No crash, no log, no error message, nothing. It's like the game is executing a kill instruction or something. The closest thing I could find to this was arbitrary code execution.
Reproduction Steps
- Download both CWSM and ModernFix
- Load up a world. Notice the odd loading screen.
- Spawn the wither storm.
- Game exits
Log File
N/A
Sudden exits are usually caused by a Java or GPU driver bug, so I'm skeptical this is actually ModernFix's fault (especially since CWSM is a fairly popular mod, and this has never been reported). That said, what Minecraft version does this occur on?
There is a comment under the Issue at CWSM talks about how ModernFix tries to free memory already freed by CWSM.
nonamecrackers2/crackers-wither-storm-mod#1902 (comment)
This is also from a crash that I got on the 1.20.1
Current thread (0x000001e7f610fb60): JavaThread "Finalizer" daemon [_thread_in_native, id=2204, stack(0x0000004c77900000,0x0000004c77a00000)]
Stack: [0x0000004c77900000,0x0000004c77a00000], sp=0x0000004c779ff018, free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ntdll.dll+0x81d20]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 11326 org.lwjgl.system.JNI.invokePV(JJ)V [email protected]+7 (0 bytes) @ 0x000001e7c56781ec [0x000001e7c56781a0+0x000000000000004c]
J 37651 c2 org.lwjgl.system.jemalloc.JEmalloc.nje_free(J)V [email protected]+7 (10 bytes) @ 0x000001e7c6a6513c [0x000001e7c6a65120+0x000000000000001c]
J 22419 c1 org.lwjgl.system.jemalloc.JEmallocAllocator.free(J)V [email protected]+7 (5 bytes) @ 0x000001e7bdda8bfc [0x000001e7bdda8ba0+0x000000000000005c]
j org.embeddedt.modernfix.render.UnsafeBufferHelper.free(Ljava/nio/ByteBuffer;)V+36 [email protected]+mc1.20.1
j com.mojang.blaze3d.vertex.BufferBuilder.finalize()V+38 [email protected]
j java.lang.System$2.invokeFinalize(Ljava/lang/Object;)V+1 [email protected]
j java.lang.ref.Finalizer.runFinalizer(Ljdk/internal/access/JavaLangAccess;)V+115 [email protected]
j java.lang.ref.Finalizer$FinalizerThread.run()V+46 [email protected]
v ~StubRoutines::call_stub
siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), writing address 0x0000000000000040
I'll disable the problematic fix if CWSM is detected in the next release. In the meantime it can be disabled manually by adding mixin.bugfix.buffer_builder_leak=false
at the bottom of config/modernfix-mixins.properties
.