Dynamic Surroundings

Dynamic Surroundings

51M Downloads

Potential NPE in PackWeatherUpdate.PacketHandler::onMessage

OreCruncher opened this issue ยท 4 comments

commented

PacketWeatherUpdate.PacketHandler#onMessage tries to access the player which may not exist yet.

commented

Underlying issue is that the player instance on the client side may not have been initialized at the time the client starts receiving events from the server. EnvironState.getWorld() would NPE under this condition.

commented

Pushed v3.4.9.9 to CurseForge.

commented

I decided to test things out. I think something else is at fault at this point, as when I updated my server for testing, I found myself still unable to enter. Well, the server said I was in, I was just stuck at the logging in screen. I also generated this massive log on the client-end.

It's so large I have to use dropbox for it.

https://www.dropbox.com/s/qs8xo489ljetlr7/latest.log?dl=0

commented

Digging through the wall of exception text I think this is the main cause of your issues:

[17:38:24] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.world.WorldEvent$Load@2f6d9ae0:
java.lang.IllegalStateException: Cannot load encyclopedia outside of a save!
	at net.tropicraft.core.encyclopedia.TropicalBook.getSaveFile(TropicalBook.java:99) ~[TropicalBook.class:?]
	at net.tropicraft.core.encyclopedia.TropicalBook.loadData(TropicalBook.java:110) ~[TropicalBook.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_2410_TropicalBook_loadData_Load.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:179) [EventBus.class:?]
	at net.minecraft.client.multiplayer.WorldClient.<init>(WorldClient.java:75) [bsb.class:?]
	at net.minecraft.client.network.NetHandlerPlayClient.func_147282_a(NetHandlerPlayClient.java:298) [brz.class:?]
	at net.minecraft.network.play.server.SPacketJoinGame.func_148833_a(SourceFile:76) [jh.class:?]
	at net.minecraft.network.play.server.SPacketJoinGame.func_148833_a(SourceFile:13) [jh.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_152]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_152]
	at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1086) [bib.class:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397) [bib.class:?]
	at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_152]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_152]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_152]
	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:?]