Page 1 of 1

[2.0.32] Crash when flipping blueprint

Posted: Fri Jan 24, 2025 10:12 pm
by TopFu
Main mod is pyAE. I pressed H to flip the following blueprint horizontally:



Instead of flipping, the game immediately crashed.
I'm able to repro the crash whether the blueprint is in the blueprint library or I'm pasting from the clipboard. The crash also happens consistently every time.

The culprit seems to be the Top Up Valve from the Valves mod. I can repro the crash from just copying the valve to clipboard and trying to flip it horizontally.

Re: [2.0.32] Crash when flipping blueprint

Posted: Fri Jan 24, 2025 10:27 pm
by Loewchen
Post a log of a session with the crash please, see 3638.

Re: [2.0.32] Crash when flipping blueprint

Posted: Sat Jan 25, 2025 12:17 am
by Muche
For a crash when flipping valves from Valves mod see also 121887 Crash flipping modded pump: flipResult.direction != Direction::None.

Re: [2.0.32] Crash when flipping blueprint

Posted: Tue Jan 28, 2025 2:07 pm
by Lou
Could you also provide a savefile where you observed this? Provided info was not suffiscient for reproduction.

Re: [2.0.32] Crash when flipping blueprint

Posted: Tue Jan 28, 2025 2:52 pm
by Stringweasel
Lou wrote: Tue Jan 28, 2025 2:07 pm Could you also provide a savefile where you observed this? Provided info was not suffiscient for reproduction.
Lou for a breaking unit test you can just create a new entity based on a pump, and change the pipe connections to

Code: Select all

pipe_connections =
  {
    { connection_type = "linked", flow_direction = "output", linked_connection_id=31113 },
    { direction = defines.direction.south, position = {0, 0.5}, flow_direction = "input" }
  }
Then create one, and flip it. Might also be that you need to assert the direction is flipped, because sometimes the direction is wrong instead of broken. And the issue is during prototype loading when it determines all the flip directions before hand it doesn't take linked connections into account. As comparison, crafters do take linked connections into account but it has some extra code around the flipping logic.

It would be awesome if this bug could be fixed :D