Page 1 of 1

[Dominik][0.17.69] Crash, FluidBoxManager consistency check fail

Posted: Wed Oct 02, 2019 4:41 am
by IChrisI
I've got just Angel's Mods, no other mods:
  • angelsbioprocessing 0.6.2
  • angelspetrochem 0.8.6
  • angelsrefining 0.10.14
  • angelssmelting 0.5.7
  • base 0.17.69
Steps to reproduce:
  1. I made a new game, cheated in a Washing Plant and a Seafloor Pump, and cheated to research all technologies.

    Code: Select all

    /c game.player.insert('washing-plant')
    /c game.player.insert('seafloor-pump')
    /c game.player.force.research_all_technologies()
  2. I placed the Washing Machine next to the shore, set it to Thin Mud Water, and rotated it so that it wants Water from the shore side.
  3. I placed the Seafloor Pump next to the Water input. The Seafloor Pump generates Viscous Mud Water, so this probably shouldn't be allowed.
  4. I hovered over the Washing Plant and pressed r to rotate it. This crashes the game.
What I expected to happen instead:
I expected the game to not crash. Instead, maybe give the "cannot mix fluid systems" error and prevent rotation.

Additional information:
  • I've included the save (Crash-Washing-Plant.zip).
  • I searched for previous bug reports and only found one that mentioned the Washing Plant or Seafloor Pump, and it didn't seem related.
  • This might be something Angel's Mods should be doing differently. I figured this is a good place to start with the report since it does cause an actual crash.
  • This crash also happens if there's a pipe between the Seafloor Pump and the Washing Machine. I assume this has the same root cause but I don't know that for sure.
  • This crash also happens with other mud washing recipes.
  • Please don't be disheartened and give up on the idea of keeping fluids separate. It's a great change for players :)

Re: [0.17.69] Crash, FluidBoxManager consistency check fail

Posted: Wed Oct 02, 2019 1:19 pm
by boskid
Nice catch, i see it crashing

Issue is that pump does not provide fluid filter when building so it can be placed, and when it is connected to something it starts pumping its own fluid but it is not compatible with fluid system.

Issue with rotate is secondary because of FS being corrupted by pump.

To fix it from mod side, fluid_box for seafloor-pump should be changed to this:

Code: Select all

    fluid_box =
    {
      base_area = 1,
      base_level = 1,
      pipe_covers = pipecoverspictures(),
      production_type = "output",
      filter = "water-viscous-mud", -- filter here
      pipe_connections =
      {
        {
          position = {0, 1},
          type = "output"
        },
      },
    },
This will most likely also need fix from factorio side as well (at least to not crash with other modded offshore pumps that may be missing filter)

Re: [0.17.69] Crash, FluidBoxManager consistency check fail

Posted: Wed Oct 02, 2019 8:50 pm
by IChrisI
Thanks boskid, I've reported the issue on the Angel's Mods forum. Chances are the Seafloor Pump will be fixed in the future.

You're right, there should probably be some kind of fix from the Factorio side as well to prevent a crash in this situation.

Re: [0.17.69] Crash, FluidBoxManager consistency check fail

Posted: Mon Oct 07, 2019 12:47 pm
by Dominik
Should I just require pumps to have a filter set? I remember that setting the filter was a fix I did for vanilla pumps long time ago.

Re: [Dominik][0.17.69] Crash, FluidBoxManager consistency check fail

Posted: Mon Oct 07, 2019 4:02 pm
by IChrisI
I'm not sure if there are any pumps out there that can pump more than one fluid, maybe choosing one based on position or biome, or if such a thing is supported.

It sounds like a good fix. But probably not a good thing to change for the next point release of 0.17 stable, since it would break at least one big-name mod. I'm not sure what your policy is on how "stable" applies to mods.

Re: [Dominik][0.17.69] Crash, FluidBoxManager consistency check fail

Posted: Fri Oct 11, 2019 9:17 am
by Dominik
I have changed it so that offshore pump setts the filter automatically based on the produced fluid.