TelepathicGrunt / Blame

make crashlogs more detailed for certain crashes
GNU Lesser General Public License v3.0
11 stars 1 forks source link

Null Pointer Exception when entity dies on Zycraft Quartz #11

Closed superninjakiwi closed 3 years ago

superninjakiwi commented 3 years ago

Not sure if this is entirely a Blame bug, but I don't see it happening without Blame installed. When an entity dies on Zycraft's Quartz(commonly a bat, so I've mostly just tested this with bats), I get the following crash:

[24/11/2020 09:38:33 AM] [Server thread/ERROR]: Encountered an unexpected exception [24/11/2020 09:38:33 AM] net.minecraft.crash.ReportedException: Colliding entity with block [24/11/2020 09:38:33 AM] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:854) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:786) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:78) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:641) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:232) ~[?:?] [24/11/2020 09:38:33 AM] at java.lang.Thread.run(Unknown Source) [?:1.8.0_211] [24/11/2020 09:38:33 AM] Caused by: java.lang.NullPointerException [24/11/2020 09:38:33 AM] at com.telepathicgrunt.blame.main.MissingLoottableBlame.addMissingLoottableDetails(MissingLoottableBlame.java:23) ~[blame:1.7.1] [24/11/2020 09:38:33 AM] at net.minecraft.loot.LootTableManager.handler$zbf000$addMissingLoottableDetails(LootTableManager.java:532) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.loot.LootTableManager.func_186521_a(LootTableManager.java) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.loot.LootContext.func_227502_a_(LootContext.java:78) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.loot.TableLootEntry.func_216154_a(SourceFile:32) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.loot.StandaloneLootEntry$1.func_216188_a(SourceFile:59) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.loot.LootPool.func_216095_b(LootPool.java:67) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.loot.LootPool.func_216091_a(LootPool.java:90) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.loot.LootTable.func_216114_a(LootTable.java:68) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.loot.LootTable.func_216120_b(LootTable.java:80) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.loot.LootTable.func_216113_a(LootTable.java:85) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.LivingEntity.func_213354_a(LivingEntity.java:1282) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.MobEntity.func_213354_a(MobEntity.java:454) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.LivingEntity.func_213345_d(LivingEntity.java:1241) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.LivingEntity.func_70645_a(LivingEntity.java:1202) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.LivingEntity.func_70097_a(LivingEntity.java:1059) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.passive.BatEntity.func_70097_a(SourceFile:217) ~[?:?] [24/11/2020 09:38:33 AM] at nikita488.zycraft.block.QuartzCrystalClusterBlock.func_196262_a(QuartzCrystalClusterBlock.java:88) ~[zycraft:1.16.3-1.1.1] [24/11/2020 09:38:33 AM] at net.minecraft.block.AbstractBlock$AbstractBlockState.func_196950_a(AbstractBlock.java:626) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.Entity.func_145775_I(Entity.java:846) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.Entity.func_213315_a(Entity.java:598) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.LivingEntity.func_233633_a_(LivingEntity.java:2053) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.LivingEntity.func_213352_e(LivingEntity.java:2014) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.LivingEntity.func_70636_d(LivingEntity.java:2449) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.MobEntity.func_70636_d(MobEntity.java:488) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.LivingEntity.func_70071_h_(LivingEntity.java:2158) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.MobEntity.func_70071_h_(MobEntity.java:300) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.entity.passive.BatEntity.func_70071_h_(SourceFile:117) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.world.server.ServerWorld.func_217479_a(ServerWorld.java:611) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.world.World.func_217390_a(World.java:554) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:404) ~[?:?] [24/11/2020 09:38:33 AM] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:850) ~[?:?] [24/11/2020 09:38:33 AM] ... 5 more

It looks like a pointer to the entity is being referenced by blame, even though the entity just died and isn't able to be referenced anymore. I'm not sure that Zycraft isn't at least partly at fault, but I don't think Blame should be crashing at this point.

TelepathicGrunt commented 3 years ago

Wtf. Why is Zycraft passing a null resourcelocation to get a loottable? : concerned : that is super concerning af. What does the logs look like if blame isnt on and you kill a bat?

TelepathicGrunt commented 3 years ago

nvm. Seems ti be a strange interaction between their block killing bats. Gonna test and push a fix soon

TelepathicGrunt commented 3 years ago

Fixed in 1.7.2. You can download it here while curseforge is reviewing the jar upload on their site. Thank you for reporting this! https://github.com/TelepathicGrunt/Blame/releases/tag/1.7.2

Not sure why a mod is passing in null for the bat loottable as that shouldn't be a thing lol