Inductive Logistics

Inductive Logistics

5M Downloads

fluid tanks sometimes duplicate their fluid

Divran opened this issue ยท 6 comments

commented

Images
https://i.imgur.com/U4770Fz.png
https://i.imgur.com/VOCS6I4.png
https://i.imgur.com/knDDH2n.png
https://i.imgur.com/LpJb8yJ.png

What I did:

See images above
I placed two 64B tanks on top of each other, draining into TE Fluiducts, then into a GTCE small boiler. When I wasn't looking, somehow, the water started duplicating itself. I have tried to reproduce it for about half an hour now with no success. I have no idea how it happened.

What happened:

See images above

What should have happened:

Shouldn't have duplicated

Used Versions:

  • Minecraft-1.12.2

  • InductiveLogistics-1.12.2-1.2.3

  • CD4017BE_lib-1.12.2-6.2.4

  • Forge-?.?.?.?

  • other installed mods (optional / only if relevant)
    ThermalDynamics-1.12.2-2.5.1.14-universal.jar
    ThermalFoundation-1.12.2-2.5.0.19-universal.jar
    GTCE (GregTech Community Edition)

  • relevant changes to config (if any)
    many changes were made, dunno if any of them are relevant

commented

I've discovered how to reproduce it

  1. fill up two tanks
  2. put fluiducts next to it, so that they touch all tanks like this https://i.imgur.com/uQcdPgx.png
  3. some fluid will now drain out of the tanks into the pipes
  4. fill up the tanks again
  5. place one more fluiduct, then delete it
  6. boom done

also https://i.imgur.com/Jq6778A.png lmao

commented

The duplication is caused by my tanks (and pipes) not changing their internal state if the inserted fluid amount they accept is negative. This can only happen if the tank is already filled above its capacity while something tries to insert Fluid into it. And this again can only happen if a fluid handler returns a negative accepted fluid amount when trying to insert into it (or if the tank capacity was reduced via config in between play sessions but this is not relevant here). So once something like this happens somewhere it can cause a chain reaction.

I fixed the duplication issue on my end, however the "seed" that started that duplication chain reaction definitely came from the Thermal Dynamics' Fluiduct. They are likely implemented in a way that all connected pipes are treated as one big Fluid storage and the breaking of that extra pipe reduced the capacity of this storage below it's contents.
The Thermal Dynamics developers could fix this by deleting any excess fluid in such a situation or at least make sure this won't force devices to insert negative amounts of fluid.

commented

Yep that's more or less what I suspected. Do you want to create an issue on the thermal dynamics repo or should I?

EDIT: alright it's been a few days now so I'm doing it

commented

Thanks @CD4017BE. Do you have any plans to push this to curseforge any time soon? (Alternatively do you have a jenkins/pipeline/anything we can steal the latest build from?)

commented

Unfortunately I was very busy with life the past few days but I'll release a build of this fix here on Github asap.

commented

Took a bit longer than planned but now it's there:
https://github.com/CD4017BE/InductiveLogistics/releases/tag/v1.3.0