maruohon / tellme

Small informational mod for Minecraft
22 stars 10 forks source link

Console spam while dumping achievements due to NPE #15

Closed LemADEC closed 5 years ago

LemADEC commented 5 years ago

As of tellme-1.12.2-0.7.0-dev.20181108.025215 and tellme-1.12.2-0.7.0-dev.20181219.233102, it seems a lot of achievements causing NPE and dump a callstack in the logs:

[22:54:09] [Server thread/WARN] [tellme]: Exception in AdvancementDump, for advancement 'minecraft:recipes/building_blocks/red_stained_hardened_clay'
java.lang.NullPointerException: null
    at fi.dy.masa.tellme.datadump.AdvancementDump.getFormattedAdvancementDumpSimple(AdvancementDump.java:29) [AdvancementDump.class:?]
    at fi.dy.masa.tellme.command.SubCommandDump.getData(SubCommandDump.java:143) [SubCommandDump.class:?]
    at fi.dy.masa.tellme.command.SubCommandDump.outputData(SubCommandDump.java:116) [SubCommandDump.class:?]
    at fi.dy.masa.tellme.command.SubCommandDump.execute(SubCommandDump.java:99) [SubCommandDump.class:?]
    at fi.dy.masa.tellme.command.CommandTellme.func_184881_a(CommandTellme.java:92) [CommandTellme.class:?]
    at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:119) [bj.class:?]
    at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:91) [bj.class:?]
    at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:960) [pa.class:?]
    at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:939) [pa.class:?]
    at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [la.class:?]
    at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [la.class:?]
    at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:20) [hv$1.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_181]
    at net.minecraft.util.Util.func_181617_a(Util.java:47) [h.class:?]
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:252) [chd.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_181]

On our large modpack, we've 672 such errors for 503 achievements actually dumped. I suggest to throttle the callstack dump, only logging the first 10 per command run or something.

maruohon commented 5 years ago

The advancement dump is pretty new and apparently not much tested... I guess I need to also add null checks to all the stuff in there.

maruohon commented 5 years ago

Try this build: https://masa.dy.fi/tmp/minecraft/mods/tellme/tellme-1.12.2-0.7.0-dev.20181221.003547.jar