-
Bug
-
Resolution: Fixed
-
Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a
-
None
-
Unconfirmed
The game fails to start if debug logging is enabled via a custom log4j config. This does not happen in 17w48a, nor does it happen if the level is changed to info.
Game output:
[13:12:08.980] [Client thread/INFO]: Setting user: pokechu22 [13:12:08.986] [Client thread/DEBUG]: (Session ID is <manually censored>) [13:12:17.176] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): java.lang.NullPointerException [13:12:17.177] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at aor.a(SourceFile:178) [13:12:17.177] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at aor.a(SourceFile:149) [13:12:17.177] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at aoz.c(SourceFile:229) [13:12:17.178] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at aoz.b(SourceFile:23) [13:12:17.178] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at aoz$a.b(SourceFile:253) [13:12:17.179] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at aoz$a.a(SourceFile:248) [13:12:17.180] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at aox.a(SourceFile:47) [13:12:17.181] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at aov.a(SourceFile:52) [13:12:17.182] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at sk.b(SourceFile:157) [13:12:17.182] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at sk.a(SourceFile:124) [13:12:17.182] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at na.c(SourceFile:475) [13:12:17.183] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at bne.<init>(SourceFile:348) [13:12:17.183] [Client thread/INFO]: [STDERR]@.(Throwable.java:748): at net.minecraft.client.main.Main.main(SourceFile:140)
No crash report is generated.
This problem appears to have been introduced in 17w49a.
The log4j config is attached. It outputs plain text, not XML.
To reproduce (native launcher)
- Select "Launch Options"
- Enable snapshots if they aren't already enabled
- Enable "Advanced settings" if it isn't already enabled
- Select "Latest snapshot" (or another profile running 17w50a)
- Click the checkbox next to "Log config" to enable the field
- Select the open icon for the log config, and then select the attached log config.
- Make sure "Custom log config outputs XML" is still unchecked.
- Save, and then return to another tab, and then launch the game.
To reproduce (server):
Place the configuration in the same folder as the server jar. Then, launch the server with the following command-line:
java -Dlog4j.configurationFile=Log4J_DebugOutput.xml -jar minecraft_server.17w50a.jar --nogui
Note that log4j will not output any warnings if the file referenced by log4j.configurationFile does not exist (i.e. there's a typo). If the server launches successfully, connect to the server. If you don't get any network DEBUG messages, then the log4j configuration was set up incorrectly.
Probable cause
It looks like resource loading has two different paths, one which occurs when debug logging is enabled (and logs things like "Resource reload for cik took 56 ms", at info level), and one which does no logging. Probably, something broke with the debug-logging route.