ModTweaker

ModTweaker

88M Downloads

"addPage" Null Pointer Exception

AlfieSR opened this issue · 8 comments

commented

[16:14:57] [Server thread/ERROR]: Couldn't process command: 'mt reload' java.lang.NullPointerException at modtweaker.mods.thaumcraft.research.AddPage.undo(AddPage.java:113) ~[AddPage.class:?] at minetweaker.runtime.MTTweaker.rollback(MTTweaker.java:83) ~[MTTweaker.class:?] at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:589) ~[MineTweakerImplementationAPI.class:?] at minetweaker.MineTweakerImplementationAPI$1.execute(MineTweakerImplementationAPI.java:82) ~[MineTweakerImplementationAPI$1.class:?] at minetweaker.MineTweakerImplementationAPI$19.execute(MineTweakerImplementationAPI.java:610) ~[MineTweakerImplementationAPI$19.class:?] at minetweaker.mc1710.server.MCServer$MCCommand.func_71515_b(MCServer.java:124) ~[MCServer$MCCommand.class:?] at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:94) [z.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:739) [nh.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:718) [nh.class:?] at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:37) [ir.class:?] at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(SourceFile:9) [ir.class:?] at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) [ej.class:?] at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165) [nc.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111) [bsx.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [?:?]

Not actually sure what's causing this. Previously the error was related to refreshing research recipes so I cleared and recreated the pages where I was previously refreshing them, and now this has come up instead.

This issue prevents the loading of more than one world in a single gamesession (singleplayer worlds will kick you back to menu, multiplayer worlds will disconnect you with an Internal Error), and causes /mt reload to fail with an internal error (causing the above in console/logs).

Attempting to load more than one world in a gamesession will also cause a memory leak, causing java to need to be shut through task manager.

A zip containing all of the zs files I have that utlise research modification can be found here
https://www.dropbox.com/s/3yh1w7kjw1efykt/scripts.rar?dl=0
I don't claim for any of them to be balanced, as they are for a private modpack circulated amung a total of 3 people including myself.

commented

This is a minetweaker issue, as it reloads scripts when joining servers, and mods are NOT meant to be reloaded.

I know it is not ideal just to leave it like this. but I honestly can not do anything

commented

Was any progress ever made on this front? I noticed that you now manage craft-tweaker, and using the latest version, similar errors persist. Is there anything I can do in the construction of my scripts to avoid this problem from happening? Any source code tweaks I could perform which might reconcile the issue?

commented

Well scripts are no longer reloaded in 1.12, so this shouldn't be an issue, unless you're not using 1.12, in which case that is your issue.

commented

I'm using 1.7.10. Is it possible to disable script reloading on my end?

commented
commented

... Right. Well, thank you for your help anyway, I suppose. Sorry to have bothered you. Have a great day.

commented

After a bit of testing I've found that the error being related to addPage is almost completely incorrect.

This error happens when attempting to return a research to another tab during a reload if that tab has been removed.

In my case,
mods.thaumcraft.Research.moveResearch("ROD_ESS_clarissa2", "ELDRITCH", 8, 1); mods.thaumcraft.Research.removeTab("EXTRASCEPTERSTAFF");

This moves the research ROD_ESS_clarissa2 from EXTRASCEPTERSTAFF into ELDRITCH but is then unable to move it back during a reload, causing the internal error and memory leaking.

commented

I can confirm that this issue happen to me as well. Got it when i tested out Agrarian Skies 2 in Multiplayer. It happens when i try to reconnect to a server, this time specifically my own.

Singleplayer it works fine though.

[12:13:32] [Client thread/ERROR] [FML/]: SimpleChannelHandlerWrapper exception
java.lang.NullPointerException
    at modtweaker2.mods.thaumcraft.research.AddPage.undo(AddPage.java:113) ~[AddPage.class:?]
    at minetweaker.runtime.MTTweaker.rollback(MTTweaker.java:83) ~[MTTweaker.class:?]
    at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:589) ~[MineTweakerImplementationAPI.class:?]
    at minetweaker.mc1710.network.MineTweakerLoadScriptsHandler.onMessage(MineTweakerLoadScriptsHandler.java:28) ~[MineTweakerLoadScriptsHandler.class:?]
    at minetweaker.mc1710.network.MineTweakerLoadScriptsHandler.onMessage(MineTweakerLoadScriptsHandler.java:21) ~[MineTweakerLoadScriptsHandler.class:?]
    at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?]
    at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) [SimpleChannelInboundHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) [SimpleChannelInboundHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?]
    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?]
    at cpw.mods.fml.common.network.internal.FMLProxyPacket.func_148833_a(FMLProxyPacket.java:77) [FMLProxyPacket.class:?]
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) [ej.class:?]
    at net.minecraft.client.multiplayer.PlayerControllerMP.func_78765_e(PlayerControllerMP.java:273) [bje.class:?]
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1590) [bao.class:?]
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:961) [bao.class:?]
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887) [bao.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:148) [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.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
[12:13:32] [Client thread/ERROR] [FML/]: There was a critical exception handling a packet on channel MineTweaker3
java.lang.NullPointerException
    at modtweaker2.mods.thaumcraft.research.AddPage.undo(AddPage.java:113) ~[AddPage.class:?]
    at minetweaker.runtime.MTTweaker.rollback(MTTweaker.java:83) ~[MTTweaker.class:?]
    at minetweaker.MineTweakerImplementationAPI.reload(MineTweakerImplementationAPI.java:589) ~[MineTweakerImplementationAPI.class:?]
    at minetweaker.mc1710.network.MineTweakerLoadScriptsHandler.onMessage(MineTweakerLoadScriptsHandler.java:28) ~[MineTweakerLoadScriptsHandler.class:?]
    at minetweaker.mc1710.network.MineTweakerLoadScriptsHandler.onMessage(MineTweakerLoadScriptsHandler.java:21) ~[MineTweakerLoadScriptsHandler.class:?]
    at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:37) ~[SimpleChannelHandlerWrapper.class:?]
    at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:17) ~[SimpleChannelHandlerWrapper.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) ~[SimpleChannelInboundHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:101) ~[SimpleChannelInboundHandler.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
    at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
    at cpw.mods.fml.common.network.internal.FMLProxyPacket.func_148833_a(FMLProxyPacket.java:77) [FMLProxyPacket.class:?]
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) [ej.class:?]
    at net.minecraft.client.multiplayer.PlayerControllerMP.func_78765_e(PlayerControllerMP.java:273) [bje.class:?]
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1590) [bao.class:?]
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:961) [bao.class:?]
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887) [bao.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:148) [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.11.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]