What did you do?
Ran attached scenario. merge-crash-minimal.zip - for client, merge-crash-minimal-server.zip - for server
What happened?
The game crashed on the next tick. Client: Car::draw → Character::getPlayerColor → ForceData::getColor. Headless server: Character::update → Character::isLootInReach.
What should have happened?
The car and its driver should be moved to the player force, like any other entity of the merged force.
Does it happen always, once, or sometimes?
Always.
I think game.merge_forces does not reassign characters sitting in vehicles, so they keep a reference to the deleted force. Characters on foot are reassigned fine.
[boskid][2.1.20] Crash after game.merge_forces when a character of the merged force is in a vehicle
-
artemlisonok
- Burner Inserter

- Posts: 6
- Joined: Sat Jun 07, 2025 2:23 am
- Contact:
[boskid][2.1.20] Crash after game.merge_forces when a character of the merged force is in a vehicle
- Attachments
-
- merge-crash-minimal.zip
- (750 Bytes) Downloaded 12 times
-
- factorio-dump-current.dmp
- (1.15 MiB) Downloaded 14 times
-
- factorio-current.log
- (12.88 KiB) Downloaded 13 times
-
- merge-crash-minimal-server.zip
- (808 Bytes) Downloaded 13 times
-
- factorio-dump-current-server.dmp
- (1007.34 KiB) Downloaded 12 times
-
- factorio-current-server.log
- (8.15 KiB) Downloaded 10 times
Re: [boskid][2.1.20] Crash after game.merge_forces when a character of the merged force is in a vehicle
Thanks for the report. Issue is now fixed for 2.1.21.
