CyclopsMC / IntegratedTunnels

Transfer other energy, items and fluids over Integrated Dynamics networks
MIT License
20 stars 13 forks source link

[Bug/Crash]: Integrated Tunnels Crashing due to what seems to be Null PartState references. #165

Closed Lanse505 closed 5 years ago

Lanse505 commented 5 years ago

Issue type:


Short description:

Pretext: We are using Sponge and are actively working on debugging any sponge related issues ahead of time and providing information on how to fix sponge related issues to server networks who are going to be using this pack.

Tagging @gabizou in-case he has anything to interject with in regards to this issue. Or if any questions regarding sponge were to surface.

This issue however we've found has no code interaction between IT/ID and Sponge. Meaning this is with most certainly not a sponge-specific issue, but it might be "extrapolated" by Sponge.

We're running into weird NPE crashes related to Integrated Tunnels. More Precisely it's related to both IEnergyTarget and IFluidTarget: Energy Fluids

For some reason, it's returning null to the part? Energy Fluid

Steps to reproduce the problem:

The steps to produce is kind of weird. Currently, it seems to be done using an Astral Sorcery set-up for growing gems and using the Integrated Tunnels to move items and fluids in and out of the world.

We haven't had time to do a dedicated system to test it.

The thing is, it seems to get more crashy and more prone to unstable-ness the more crashes happen. And we're currently at the state where it crashes whenever anyone logs on to the server and loads a build using Integrated Tunnels.

Expected behaviour:

No Crash, and things working as intended.


Versions:

Log file:

Energy Log Energy Line

Fluid Log Fluid Line

rubensworks commented 5 years ago

That's odd. The only explanation I have is that there's some kind of chunkloading issue when spongeforge is used. I'll have a look at it soon.

rubensworks commented 5 years ago

@Lanse505 I may have a fix for this problem, could you try out IT build 329 to see if this fixes your problem? (see readme for link to dev builds)

Lanse505 commented 5 years ago

Ill have our server owner throw it on the dev server. Ill get back to you once I have an answer to if its fixed

gabizou commented 5 years ago

Ah hi, yes, I've got an explanation for why a chunk seemingly is having an issue, it may be that when there's a request for a chunk load during specific states of the game, Sponge goes to deny those requests with an empty chunk. The reasoning behind this is that performance of Chunk GC'ing (unloading) over a single tick ends up getting spammed when there's excessive requests for one off instances that don't intend to keep those chunks loaded. It's possible that by getting an empty chunk, the "part" is null and causing an NPE in your code.

If I can find out, what/when does your code specifically check for part states to where we might be able to return loadable chunks instead of empty chunks? Of course, the alternative is your workaround fix where a null check will perform the same resolution.

rubensworks commented 5 years ago

Thanks for the information @gabizou! If @Lanse505 still has problems with the latest IT dev build, I'll give you some more information regarding part state checking.

no-response[bot] commented 5 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.