mchorse / metamorph

Morphing mod for Minecraft 1.12.2
Other
72 stars 42 forks source link

Spam your mod in the log file #286

Closed SeagalKru closed 2 years ago

SeagalKru commented 2 years ago

https://github.com/SuperMartijn642/SuperMartijn642sConfigLib/issues/6

Hello! I had a problem with one of the other mods that I reported to the modder with the log file attached. According to his fashion, he is now working, and according to your fashion, he asked me to inform you that your mod is causing a lot of spam in the log file. I provide you with a link to our communication so as not to create unnecessary reports. If I'm needed, I'm available. Thank you!

Chryfi commented 2 years ago

Thank you for reporting, I will look into this.

SuperMartijn642 commented 2 years ago

Hi there, I'm the dev from the other issue (unrelated problem btw). Since I realize the log is quite long, this is the error I was referring to:

Error ``` [15:41:22] [Client thread/ERROR]: Exception caught during firing event net.minecraftforge.event.AttachCapabilitiesEvent@6559ffb3: java.lang.NullPointerException: null at mchorse.metamorph.capabilities.CapabilityHandler.attachCapability(CapabilityHandler.java:70) ~[CapabilityHandler.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1496_CapabilityHandler_attachCapability_AttachCapabilitiesEvent.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:182) [EventBus.class:?] at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:691) [ForgeEventFactory.class:?] at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:661) [ForgeEventFactory.class:?] at net.minecraft.entity.Entity.(Entity.java:219) [vg.class:?] at net.minecraft.entity.EntityLivingBase.(EntityLivingBase.java:164) [vp.class:?] at net.minecraft.entity.EntityLiving.(EntityLiving.java:120) [vq.class:?] at net.minecraft.entity.EntityCreature.(SourceFile:21) [vx.class:?] at net.minecraft.entity.monster.EntityMob.(EntityMob.java:26) [ade.class:?] at mcpecommander.mobultion.entity.entities.spiders.EntityAnimatedSpider.(EntityAnimatedSpider.java:44) [EntityAnimatedSpider.class:?] at mcpecommander.mobultion.entity.entities.spiders.EntityWitherSpider.(EntityWitherSpider.java:44) [EntityWitherSpider.class:?] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_51] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_51] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [?:1.8.0_51] at net.minecraftforge.fml.common.registry.EntityEntryBuilder$ConstructorFactory.apply(EntityEntryBuilder.java:305) [EntityEntryBuilder$ConstructorFactory.class:?] at net.minecraftforge.fml.common.registry.EntityEntryBuilder$ConstructorFactory.apply(EntityEntryBuilder.java:291) [EntityEntryBuilder$ConstructorFactory.class:?] at net.minecraftforge.fml.common.registry.EntityEntry.newInstance(EntityEntry.java:68) [EntityEntry.class:?] at mcpecommander.mobultion.integration.JEI.register(JEI.java:86) [JEI.class:?] at mezz.jei.startup.JeiStarter.registerPlugins(JeiStarter.java:213) [JeiStarter.class:?] at mezz.jei.startup.JeiStarter.start(JeiStarter.java:77) [JeiStarter.class:?] at mezz.jei.startup.ProxyCommonClient.loadComplete(ProxyCommonClient.java:136) [ProxyCommonClient.class:?] at mezz.jei.JustEnoughItems.loadComplete(JustEnoughItems.java:55) [JustEnoughItems.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:637) [FMLModContainer.class:?] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) [guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) [LoadController.class:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) [LoadController.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [guava-21.0.jar:?] at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [guava-21.0.jar:?] at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [guava-21.0.jar:?] at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [guava-21.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:217) [guava-21.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:757) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:535) [bib.class:?] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378) [bib.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] 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:?] ```

It occurs during the AttachCapabilitiesEvent for entities and thus gets printed every time an entity is created.

Chryfi commented 2 years ago

Thanks for the information. I will add a simple null check. I assume event.getObject() can be null and not the event itself.