Draconic Evolution

Draconic Evolution

77M Downloads

[1.18] ComputerCraft Computer crashes after a while when reading values from Energy Core

FoxMcloud5655 opened this issue ยท 2 comments

commented

Base information

  • Minecraft version: 1.18.2
  • Mod version: 3.0.29.524
  • Minecraft Forge version: 40.2.0
  • Mod Pack: The Crafty Kettle (can reproduce with only ComputerCraft as an extra dependency)

Description / steps to reproduce

An error occurs when trying to get the energy readout on a ComputerCraft computer for an Energy Core either after a while or after the chunk unloads; unsure of what the trigger is, but it happens very often when joined to a dedicated server.

Relevent error:

java.lang.NullPointerException: Cannot read field "energy" because the return value of "com.brandon3055.draconicevolution.blocks.tileentity.TileEnergyPylon.getCore()" is null
at com.brandon3055.draconicevolution.blocks.tileentity.TileEnergyPylon$1.getOPStored(TileEnergyPylon.java:95) ~[Draconic-Evolution-1.18.2-3.0.29.524-universal.jar%23126!/:1.18.2-3.0.29.524] {re:classloading}
at com.brandon3055.draconicevolution.integration.computers.PeripheralEnergyPylon.getEnergyStored(PeripheralEnergyPylon.java:41) ~[Draconic-Evolution-1.18.2-3.0.29.524-universal.jar%23126!/:1.18.2-3.0.29.524] {re:classloading}
at com.brandon3055.draconicevolution.integration.computers.PeripheralEnergyPylon$cc$getEnergyStored145.apply(CC generated method) ~[?:?] {re:classloading,re:classloading}
at dan200.computercraft.core.apis.PeripheralAPI$PeripheralWrapper.call(PeripheralAPI.java:112) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at dan200.computercraft.core.apis.PeripheralAPI.call(PeripheralAPI.java:361) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at dan200.computercraft.core.apis.PeripheralAPI$cc$call90.apply(CC generated method) ~[?:?] {re:classloading,re:classloading}
at dan200.computercraft.core.lua.ResultInterpreterFunction.invoke(ResultInterpreterFunction.java:61) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at cc.tweaked.internal.cobalt.function.ResumableVarArgFunction.invoke(ResumableVarArgFunction.java:77) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at cc.tweaked.internal.cobalt.function.LuaInterpreter.execute(LuaInterpreter.java:506) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at cc.tweaked.internal.cobalt.function.LuaInterpretedFunction.resume(LuaInterpretedFunction.java:196) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at cc.tweaked.internal.cobalt.debug.DebugFrame.resume(DebugFrame.java:243) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at cc.tweaked.internal.cobalt.LuaThread.loop(LuaThread.java:570) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at cc.tweaked.internal.cobalt.LuaThread$1.run(LuaThread.java:466) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at dan200.computercraft.core.lua.CobaltLuaMachine.lambda$new$1(CobaltLuaMachine.java:80) ~[cc-tweaked-1.18.2-1.101.2.jar%2384!/:1.101.2] {re:classloading}
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?] {}
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?] {}
at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin}
commented

May i have look at the code you used?

commented

This bug has not been fixed yet... But this code is open source. You can go find it yourself.