Not Enough Crashes (Fabric)

Not Enough Crashes (Fabric)

4M Downloads

Holding F3+C post-crash crashes recursively, eventually raising a `java.lang.StackOverflowError`

James103 opened this issue · 2 comments

commented

Modlist (MC 1.16.5):

Mods:
  [✔️] fabric-api-0.34.2+1.16
  [✔️] notenoughcrashes-3.2.0-fabric

(the presence of a custom version of "Healthcare" mod does not matter here)

When you hold down F3+C post-crash, the game can end up crashing recursively. Doing this for long enough will eventually raise a java.lang.StackOverflowError, but it requires that you either do -Xss128k (or as low as you can go) and/or have enough space to store a log file that's 1 GB in size (proportional to the -Xss stack size squared).

Example stack trace:

java.lang.Throwable
	at Not Enough Crashes deobfuscated stack trace.(1.16.5+build.5)
	at net.minecraft.client.Keyboard.pollDebugCrash(Keyboard:458)
	at net.minecraft.client.MinecraftClient.tick(MinecraftClient:1609)
	at net.minecraft.client.MinecraftClient.render(MinecraftClient:1021)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:681)
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:699)
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:699)
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:699)
...
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:699)
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:699)
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:699)
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:699)
	at net.minecraft.client.main.Main.main(Main:215)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:226)
	at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:146)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
commented

I was finally able to trigger the stack overflow after almost 3000 recursive crashes and nearly 1 GB of raw data written to the Minecraft Log, though the exception thrown that caused the recursive crashes was java.lang.NullPointerException: null, instead of java.lang.Throwable: Manually triggered debug crash. The interesting part of the stack trace is posted below:

[19:32:19] [main/ERROR]: An uncaught exception occured while displaying the crash screen, making normal report instead
java.lang.StackOverflowError: null
	at Not Enough Crashes deobfuscated stack trace.(1.16.5+build.5) ~[?:?]
	at java.io.FileOutputStream.writeBytes(Native Method) ~[?:1.8.0_265]
	at java.io.FileOutputStream.write(FileOutputStream.java:326) ~[?:1.8.0_265]
	at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122) ~[?:1.8.0_265]
	at java.io.PrintStream.write(PrintStream.java:480) ~[?:1.8.0_265]
	at org.apache.logging.log4j.core.util.CloseShieldOutputStream.write(CloseShieldOutputStream.java:53) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.appender.OutputStreamManager.writeToDestination(OutputStreamManager.java:256) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.appender.OutputStreamManager.flushBuffer(OutputStreamManager.java:288) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.appender.OutputStreamManager.drain(OutputStreamManager.java:345) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.layout.TextEncoderHelper.drainIfByteBufferFull(TextEncoderHelper.java:147) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.layout.TextEncoderHelper.encodeAsMuchAsPossible(TextEncoderHelper.java:125) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.layout.TextEncoderHelper.encode(TextEncoderHelper.java:109) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.layout.TextEncoderHelper.encodeText(TextEncoderHelper.java:89) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encodeSynchronized(StringBuilderEncoder.java:85) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encode(StringBuilderEncoder.java:61) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encode(StringBuilderEncoder.java:32) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:219) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:57) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:177) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:170) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:161) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.appender.rewrite.RewriteAppender.append(RewriteAppender.java:83) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:448) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:433) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:417) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:403) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146) ~[log4j-core-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2091) ~[log4j-api-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1988) ~[log4j-api-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1960) ~[log4j-api-2.8.1.jar:2.8.1]
	at org.apache.logging.log4j.spi.AbstractLogger.fatal(AbstractLogger.java:1030) ~[log4j-api-2.8.1.jar:2.8.1]
	at fudge.notenoughcrashes.stacktrace.CrashUtils.outputReport(CrashUtils.java:44) ~[notenoughcrashes-3.2.0-fabric.jar:?]
	at fudge.notenoughcrashes.mixinhandlers.InGameCatcher.displayCrashScreen(InGameCatcher.java:65) ~[notenoughcrashes-3.2.0-fabric.jar:?]
	at fudge.notenoughcrashes.mixinhandlers.InGameCatcher.handleClientCrash(InGameCatcher.java:35) ~[notenoughcrashes-3.2.0-fabric.jar:?]
	at net.minecraft.client.MinecraftClient.modify$zfk000$onCrash(MinecraftClient:3412) ~[?:?]
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:704) ~[?:?]
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404) ~[?:?]
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:704) ~[?:?]
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404) ~[?:?]
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:704) ~[?:?]
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404) ~[?:?]
	...
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:704) ~[?:?]
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404) ~[?:?]
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:704) ~[?:?]
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404) ~[?:?]
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:704) ~[?:?]
	at net.minecraft.client.MinecraftClient.handler$zfk000$afterCrashHandled(MinecraftClient:3404) ~[?:?]

commented

wontfix, fixing this is quite difficult and I would imagine a normal person would just lift their finger at some point.