Crash w/ Zoology Mod
WenXin20 opened this issue · 16 comments
Forge 1.10.2-2221
Zoology v1.0.1 alpha
Metamorph v1.1
I got a crash with Zoology after opening the creative morph menu.
Crash in the Log (No crash report formed for me):
[16:36:06] [Client thread/ERROR] [FML/]: Exception caught during firing event net.minecraftforge.fml.common.gameevent.InputEvent$KeyInputEvent@57cb24a:
net.minecraft.util.ReportedException: Saving entity NBT
at net.minecraft.entity.Entity.func_189511_e(Entity.java:1611) ~[rw.class:?]
at net.minecraft.entity.Entity.serializeNBT(Entity.java:2903) ~[rw.class:?]
at mchorse.vanilla_pack.MobMorphFactory.addMorph(MobMorphFactory.java:164) ~[MobMorphFactory.class:?]
at mchorse.vanilla_pack.MobMorphFactory.addMorph(MobMorphFactory.java:154) ~[MobMorphFactory.class:?]
at mchorse.vanilla_pack.MobMorphFactory.getMorphs(MobMorphFactory.java:64) ~[MobMorphFactory.class:?]
at mchorse.metamorph.api.MorphManager.getMorphs(MorphManager.java:173) ~[MorphManager.class:?]
at mchorse.metamorph.client.gui.elements.GuiCreativeMorphs.compileCategories(GuiCreativeMorphs.java:94) ~[GuiCreativeMorphs.class:?]
at mchorse.metamorph.client.gui.elements.GuiCreativeMorphs.(GuiCreativeMorphs.java:74) ~[GuiCreativeMorphs.class:?]
at mchorse.metamorph.client.gui.elements.GuiCreativeMorphs.(GuiCreativeMorphs.java:80) ~[GuiCreativeMorphs.class:?]
at mchorse.metamorph.client.gui.GuiCreativeMenu.(GuiCreativeMenu.java:59) ~[GuiCreativeMenu.class:?]
at mchorse.metamorph.client.KeyboardHandler.onKey(KeyboardHandler.java:102) ~[KeyboardHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1108_KeyboardHandler_onKey_KeyInputEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) [EventBus.class:?]
at net.minecraftforge.fml.common.FMLCommonHandler.fireKeyInput(FMLCommonHandler.java:555) [FMLCommonHandler.class:?]
at net.minecraft.client.Minecraft.func_184118_az(Minecraft.java:1958) [bcx.class:?]
at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1749) [bcx.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1055) [bcx.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:371) [bcx.class:?]
at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
Caused by: java.lang.IllegalStateException
at com.rwtema.zoology.phenes.PheneList.serializeNBT(PheneList.java:83) ~[PheneList.class:?]
at com.rwtema.zoology.phenes.PheneList.serializeNBT(PheneList.java:22) ~[PheneList.class:?]
at net.minecraftforge.common.capabilities.CapabilityDispatcher.serializeNBT(CapabilityDispatcher.java:121) ~[CapabilityDispatcher.class:?]
at net.minecraft.entity.Entity.func_189511_e(Entity.java:1580) ~[rw.class:?]
... 25 more
I was able to get the Crash Report this time
I also noticed that when I morphed back into the player, I get killed.
@WenXin20 I don't really know what I can do about this error, I will ask mod's developer, though.
Is it possible add a way to prevent the crash and just prevent it from displaying the mob until the real solution can be found since @rwtema seems to be inactive?
I don't think so. Because this will affect all animal mobs, and I think you wouldn't be able to use animal morphs in survival morph menu too or even morph into animal morphs.
Maybe there's a way, and I'll look into it.
Thanks.
While in a creative world, I was able to kill sheep and cows to get their morphs and access the survival morph menu afterwards, so it only seems to affect the creative menu, although I didn't try all mobs that Zoology changes.
It's happens in creative morph menu, because there's a special way in which morphs are generated for the display. With survival stuff, the entity is first deserialized, and afterward it's serialized, but in creative morph menu, it's first serialized, and then deserialized.
In @rwtema's code, if this list is serialized first, it's an illegal state, it seems like it first have to be deserialized from NBT or generated. Btw, which build of Metamorph are you using (1.10.2, 1.9.4 or 1.11.2)?
Hm, really strange, after I'll finish the thing I currently working on, I might take a look at testing Metamorph with Zoology mod.
Ok, thanks, that works for me, so that at least the creative menu is accessible now.