[raiguard][2.0.19] Crash flipping modded pump: flipResult.direction != Direction::None

This subforum contains all the issues which we already resolved.
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 439
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

[raiguard][2.0.19] Crash flipping modded pump: flipResult.direction != Direction::None

Post by Stringweasel »

What happened
If you flip some of the modded pumps (the valves from the Valves mod mod) the game crashes with

Code: Select all

  76.354 Error Entity.cpp:2337: flipResult.direction != Direction::None was not true
Reproduction
  • Install mod
  • Go into /editor (need editor to flip pumps which are set as operable=false)
  • Place a Overflow or Top-Up valve (any direction)
  • Flip (any direction, H or V)
  • Crash!
The modded pumps
I believe it's caused by the linked + normal connection. The two pumps that crash's pipe connections look like this, or the inverse of this where the normal connection is the input, and the linked the output.

Code: Select all

    { direction = defines.direction.south, position = {0, 0}, flow_direction = "output" },
    { connection_type = "linked", flow_direction = "input", linked_connection_id=31113 - 1 }
It's probably due to this combination. The one-way valve has two linked connections and doesn't cause a crash, but it doesn't mirror correctly, instead it sort-off rotates.

Ref.:
125146
Attachments
factorio-current.log
(14.49 KiB) Downloaded 30 times
valves_1.1.3.zip
(342.26 KiB) Downloaded 22 times
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 439
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: [2.0.19] Crash flipping modded pump: flipResult.direction != Direction::None

Post by Stringweasel »

For easy reproduction try to flip a modified pump with the following pipe connections:

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" }
  }
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
StormTAG
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Wed Feb 10, 2016 12:40 pm
Contact:

Re: [2.0.19] Crash flipping modded pump: flipResult.direction != Direction::None

Post by StormTAG »

Also ran into this issue. Was not actually connected to any pipes.

Attached a minimum-steps save file.

1. Load save file
2. Copy valve
3. Flip
Attachments
Minimum Valve Failure Save.zip
(1.31 MiB) Downloaded 22 times
Krydax
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Jul 09, 2021 6:18 pm
Contact:

Re: [2.0.19] Crash flipping modded pump: flipResult.direction != Direction::None

Post by Krydax »

I am running into this HARD CRASH as well. All you need to do is copy a valve with ctrl+c and flip with H or V and boom, crash to desktop.

It's extra frustrating because you can't copy blueprints without living in fear you might have accidentally grabbed a valve and will crash your game. Hoping the devs can fix this one soon!

(this is also my second time writing this comment. My previous one seems to have been deleted by some unknown factor with no notification/explanation and I'm very confused by that)
User avatar
dragon-architect
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sun Dec 17, 2023 7:41 pm
Contact:

Re: [2.0.19] Crash flipping modded pump: flipResult.direction != Direction::None

Post by dragon-architect »

Gonna +1 this as well. I ran into this issue when attempting to ctrl+x and then h-flip a bit of plumbing with valves. Considering others' reports that this happened with ctrl+c or ctrl+x, I also attempted to just alt+b to blueprint it and flip as a blueprint and still got a hard crash.

Full stack trace from log file:

Code: Select all

  44.730 Info AppManagerStates.cpp:2095: Saving finished
Factorio crashed. Generating symbolized stacktrace, please wait ...
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Util\ReleaseAssert.cpp(7): ReleaseAssertFailed
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Entity\Entity.cpp(2308): Entity::flip
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Graphics\EntityToBeBuiltSettings.cpp(37): EntityToBeBuiltSettings::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Graphics\DrawBlueprintToBeBuiltLogic.cpp(188): DrawBlueprintToBeBuiltLogic::drawEntitiesCore
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Graphics\DrawBlueprintToBeBuiltLogic.cpp(147): DrawBlueprintToBeBuiltLogic::drawEntities
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Graphics\BuildingRenderer.cpp(253): BuildingRenderer::drawBlueprintToBeBuilt
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Graphics\BuildingRenderer.cpp(199): BuildingRenderer::prepareBuildingInGame
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Graphics\BuildingRenderer.cpp(102): BuildingRenderer::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Graphics\GameRenderer.cpp(102): GameRenderer::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\GameView.cpp(1518): GameView::prepareRender
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Game.cpp(330): Game::prepareRender
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\MainLoop.cpp(1143): MainLoop::prepare
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\MainLoop.cpp(708): MainLoop::mainLoopStep
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\MainLoop.cpp(412): MainLoop::run
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Main.cpp(1357): fmain
C:\Users\build\AppData\Local\Temp\factorio-build-iHERbO\src\Main.cpp(1379): wmain
D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288): __scrt_common_main_seh
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFFC3CB7374)
00007FFFC3CB7374 (KERNEL32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00007FFFC4A1CC91)
00007FFFC4A1CC91 (ntdll): (filename not available): RtlUserThreadStart
Stack trace logging done
  53.011 Error Entity.cpp:2308: flipResult.direction != Direction::None was not true
  53.011 Error CrashHandler.cpp:643: Received 22
Logger::writeStacktrace skipped.
  53.011 Error CrashHandler.cpp:190: Map tick at moment of crash: 12600676
  53.068 Info CrashHandler.cpp:318: Executable CRC: 2137041080
  53.068 Error Util.cpp:95: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
  59.220 Uploading log file
  59.235 Error CrashHandler.cpp:270: Heap validation: success.
  59.236 Creating crash dump.
  59.448 CrashDump success
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 439
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: [2.0.19] Crash flipping modded pump: flipResult.direction != Direction::None

Post by Stringweasel »

For reference, another report: 126302
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
Toruk
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Jan 31, 2025 9:44 am
Contact:

Re: [raiguard][2.0.19] Crash flipping modded pump: flipResult.direction != Direction::None

Post by Toruk »

+1 to this - I'm experiencing the same crash as others, same stack trace (Error Entity.cpp:2308: flipResult.direction != Direction::None was not true)

I've been able to reproduce the crash under the following scenarios:
- flipping valve already placed in world
- flipping while placing clipboard copy/paste that contains a valve
- flipping while placing blueprint that contains a valve

Flipping a valve that's in your cursor does *not* produce a crash, but it doesn't produce the correct orientation (e.g. horizontally flipping a valve (either overflow or top-up) with east-facing output rotates the valve so that the output faces south)

Only flipping the overflow and top-up valves create a CTD, but the one-way valve also does not flip correctly (east-facing valve horizontally flips to face south, for example), which has the same incorrect flip direction as the top-up/overflow valves which makes me think that the incorrect flip orientations are also related to this issue.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 682
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard][2.0.19] Crash flipping modded pump: flipResult.direction != Direction::None

Post by raiguard »

Thanks for the report, this has been fixed for 2.0.35.
Don't forget, you're here forever.
Post Reply

Return to “Resolved Problems and Bugs”