[2.0.60] Crash driving into invisible cliff "Car.cpp: Branch expected not to be reachable has been reached!"

This subforum contains all the issues which we already resolved.
sejemsom
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Oct 27, 2024 1:56 pm
Contact:

[2.0.60] Crash driving into invisible cliff "Car.cpp: Branch expected not to be reachable has been reached!"

Post by sejemsom »

What did you do?
I was dealing with some biter expansions, when I drove into a half-generated cliff that crashed the game.

What happened?
according to the crash log:
5176.751 Error Car.cpp:609: Branch expected not te be reachable (due to changes during Car Latency implementation) has been reached!
, so it's something that has to do with the cars latency. To note: this is a singleplayer world.

What did you expect to happen instead? It might be obvious to you, but do it anyway!
I expected it to be a visual artifact that I can drive past, or at worst bump into and have to drive besides. Game instead folded under itself, crashing the game in the process.

Does it happen always, once, or sometimes?
Always, I've gone back to test, and driving a car into the invisible cliff crashes.
  • I can walk up against the invisible cliff with my character and it registers that it's there just fine
  • Game objects (like belts) also notice that it's there and thus can't be placed
  • Using a vehicle, such as a Car or a Tank, it crashes the moment the supposed collision is touched.
Another interesting thing that I've noticed, is that the collision box for the 'invisible' cliff actually shows itself, but only if it touches the edge of my screen.
07-27-2025, 19-18-40.png
07-27-2025, 19-18-40.png (274.73 KiB) Viewed 705 times
savefile:
seje -- exfrets randomizer -- 2025.07.11.zip
(9.8 MiB) Downloaded 16 times
mod(s):
07-27-2025, 19-22-37.png
07-27-2025, 19-22-37.png (77.51 KiB) Viewed 705 times
; so basically a Vanilla Space Age run, under Exferts property randomizer
https://mods.factorio.com/mod/propertyrandomizer.

Removing said mod makes it so that the cliff appears, and thus the car can no longer drive into it to cause a crash.
Attachments
factorio-current.log
(499.48 KiB) Downloaded 14 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 15910
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.60] Crash driving into invisible cliff "Car.cpp: Branch expected not to be reachable has been reached!"

Post by Rseding91 »

Thanks for the report. It looks like we never enforced that cliff bounding boxes were valid according to the games assumptions about entity position vs its bounding box. That meant that the cliff ended up having a bounding box that didn't contain the entity position and when that happens, the games entity finding logic fails to find the cliff under some scenarios.

The fix is to disallow those kinds of bounding boxes from being defined on cliffs. That means this is fixed for the next release - however it will cause a startup error saying the bounding box is invalid for the cliff - when you use this mod.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”