NullPointerException: Cannot invoke "ic2.core.energy.EnergyNetLocal$Connectivity.get(boolean)"
innerdev opened this issue · 9 comments
Hello.
I just start playing the mod. It is installed on my dedicated server. Today I started to get the following error with server crash after it:
Index: 1
Listeners:
0: NORMAL
1: ASM: ic2.core.platform.events.IC2EventHandler@96a2cf1 onWorldTickEvent(Lnet/minecraftforge/event/TickEvent$LevelTickEvent;)V
2: ASM: me.lucko.spark.forge.ForgeTickHook@c52710a onTick(Lnet/minecraftforge/event/TickEvent;)V
3: ASM: me.lucko.spark.forge.ForgeTickReporter@664fb61d onTick(Lnet/minecraftforge/event/TickEvent;)V
4: ASM: class ru.innerdev.pelog.Pelog onEvent(Lnet/minecraftforge/eventbus/api/Event;)V
java.lang.NullPointerException: Cannot invoke "ic2.core.energy.EnergyNetLocal$Connectivity.get(boolean)" because the return value of "java.util.Map.get(Object)" is null
at TRANSFORMER/[email protected]/ic2.core.energy.EnergyNetLocal.discoverPaths(EnergyNetLocal.java:866)
at TRANSFORMER/[email protected]/ic2.core.energy.EnergyNetGrid.updatePaths(EnergyNetGrid.java:242)
at TRANSFORMER/[email protected]/ic2.core.energy.EnergyNetGrid.processChanges(EnergyNetGrid.java:206)
at TRANSFORMER/[email protected]/ic2.core.energy.EnergyNetLocal.onTickStop(EnergyNetLocal.java:136)
at TRANSFORMER/[email protected]/ic2.core.energy.EnergyNetGlobal.onWorldTickStop(EnergyNetGlobal.java:161)
at TRANSFORMER/[email protected]/ic2.core.platform.events.IC2EventHandler.onWorldTickEvent(IC2EventHandler.java:441)
at TRANSFORMER/[email protected]/ic2.core.platform.events.__IC2EventHandler_onWorldTickEvent_LevelTickEvent.invoke(.dynamic)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
at TRANSFORMER/[email protected]/net.minecraftforge.event.ForgeEventFactory.onPostLevelTick(ForgeEventFactory.java:820)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:872)
at TRANSFORMER/[email protected]/net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:292)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:806)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244)
at java.base/java.lang.Thread.run(Thread.java:833)
[25янв.2023 00:52:27.451] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
java.lang.NullPointerException: Cannot invoke "ic2.core.energy.EnergyNetLocal$Connectivity.get(boolean)" because the return value of "java.util.Map.get(Object)" is null
at ic2.core.energy.EnergyNetLocal.discoverPaths(EnergyNetLocal.java:866) ~[IC2Classic-1.19.2-2.0.2.jar%23110!/:1.19.2-2.0.2]
at ic2.core.energy.EnergyNetGrid.updatePaths(EnergyNetGrid.java:242) ~[IC2Classic-1.19.2-2.0.2.jar%23110!/:1.19.2-2.0.2]
at ic2.core.energy.EnergyNetGrid.processChanges(EnergyNetGrid.java:206) ~[IC2Classic-1.19.2-2.0.2.jar%23110!/:1.19.2-2.0.2]
at ic2.core.energy.EnergyNetLocal.onTickStop(EnergyNetLocal.java:136) ~[IC2Classic-1.19.2-2.0.2.jar%23110!/:1.19.2-2.0.2]
at ic2.core.energy.EnergyNetGlobal.onWorldTickStop(EnergyNetGlobal.java:161) ~[IC2Classic-1.19.2-2.0.2.jar%23110!/:1.19.2-2.0.2]
at ic2.core.platform.events.IC2EventHandler.onWorldTickEvent(IC2EventHandler.java:441) ~[IC2Classic-1.19.2-2.0.2.jar%23110!/:1.19.2-2.0.2]
at ic2.core.platform.events.__IC2EventHandler_onWorldTickEvent_LevelTickEvent.invoke(.dynamic) ~[IC2Classic-1.19.2-2.0.2.jar%23110!/:1.19.2-2.0.2]
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2351!/:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2351!/:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2351!/:?]
at net.minecraftforge.event.ForgeEventFactory.onPostLevelTick(ForgeEventFactory.java:820) ~[forge-1.19.2-43.2.3-universal.jar%23122!/:?]
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:872) ~[server-1.19.2-20220805.130853-srg.jar%23117!/:?]
at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:292) ~[server-1.19.2-20220805.130853-srg.jar%23117!/:?]
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:806) ~[server-1.19.2-20220805.130853-srg.jar%23117!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654) ~[server-1.19.2-20220805.130853-srg.jar%23117!/:?]
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[server-1.19.2-20220805.130853-srg.jar%23117!/:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
[Server thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID f0df41ee-ba53-4c6b-b629-b390c1e02bfc
[Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: This crash report has been saved to: /var/games/mc1/./crash-reports/crash-2023-01-25_00.52.27-server.txt
[Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Stopping server
Can you help me, please? Version: 2.0.2 or 2.0.3 (result is the same). Minecraft version: 1.19.2, Forge version 43.2.3
As I can see it's duplicate of #529
Well, I have world backup, logs, everything (I hope) you need to debug this problem. By the way, log is pretty completed because there is nothing else...
Can you PM me in Discord? It's me: innerdev#6184
I have uploaded copy of the world on my google drive: https://drive.google.com/file/d/1Dz1x2XiaidBBwYP8dDPDpg44-QpG5hlm/view?usp=share_link
The mechanism is located somewhere on 1271 64 647 coords (actually, i'm not sure, sorry).
Also, the list of installed mods on my server is: Decoration-Mod-1.10-Ver-1.19.2.jar, IC2Classic-1.19.2-2.0.2.jar , Decorative-Blocks-forge-1.19.2-3.0.0.jar, ironchest-1.19.2-14.2.7.jar, Dynmap-3.5-beta-1-forge-1.19.2.jar, jei-1.19.2-forge-11.5.0.297.jar, spark-1.9.45-forge.jar
@Speiger (cast you just in case)
@innerdev is it a easy to reproduce able setup? Also on the curseforge page you can find the ic2c discord server.
I wrote you in discord.
@innerdev is it a easy to reproduce able setup?
Also on the curseforge page you can find the ic2c discord server.
@innerdev and you didn't answer my question.
Do you have a way to reproduce the crash in a consistent way?
Like a list of instructions of what to do.
Because I need to be able to "reproduce" it otherwise i can not really test it, since the enet is really complex.
@innerdev next time look at the "roles" channel where it says:
"Please pick the channels you want to see, so you wont be spammed with everything".
But oh well...
@innerdev and you didn't answer my question. Do you have a way to reproduce the crash in a consistent way? Like a list of instructions of what to do. Because I need to be able to "reproduce" it otherwise i can not really test it, since the enet is really complex.
Didn't answer because was not sure. But now I am - yes, I can reproduce it in a sonsistent way. But not lika a list of instructions, because the bug not showing up in a new clean world, dont know why. As I said I have world dump and everything.
Wait a second, I'll try to send you few screenshots via discord again :/
@innerdev thank you.
This actually helped.
Here is the actual problem:
If a EnergyStorage/Transformer is connected by 3 sides (1 being the output and 2 being the inputs) by the same wire and causing a loop.
If they do unload this can lead to a crash.
Simple temp fix:
If you need to connect input/output use a Transformer to make a 1 way direction for power to flow so the output doesn't touch the input.
Example images:
Crashing
NonCrashing