[boskid][1.1.80] Crash shortly after loading save (Commandable::findDistraction)

This subforum contains all the issues which we already resolved.
Post Reply
UberKitten
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Apr 17, 2023 8:11 am

[boskid][1.1.80] Crash shortly after loading save (Commandable::findDistraction)

Post by UberKitten »

I've been having this crash happen consistently within ~60 minutes of gameplay. With my recent auto-save the crash is consistent with no user input in about 5 seconds after the save is loaded.

Relevant lines from exception stack trace:

Code: Select all

c:\tmp\factorio-build-1kjbgw\src\ai\commandable.cpp (282): Commandable::findDistraction
c:\tmp\factorio-build-1kjbgw\src\ai\commandable.cpp (199): Commandable::runBehavior
c:\tmp\factorio-build-1kjbgw\src\ai\unitgroup.cpp (286): UnitGroup::update
c:\tmp\factorio-build-1kjbgw\src\ai\commander.cpp (243): Commander::update
Attachments
_autosave3.zip
(17.68 MiB) Downloaded 46 times
factorio-dump-current.dmp
(1.07 MiB) Downloaded 44 times
factorio-current.log
(336.36 KiB) Downloaded 45 times

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2253
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][1.1.80] Crash shortly after loading save (Commandable::findDistraction)

Post by boskid »

Thanks for the save file, by being able to consistently reproduce the issue i was able to narrow down what the issue is. There are layers of moving pieces involved, the core of the issue is that mod Rampant is setting composite command with a Flee+Group command making a unit not yet member of a unit group, but later when the unit group becomes dead, the unit joins a dead unit group causing various consistency issues, the main one was that unit group had no command set and the Commandable::findDistraction was trying to use the command causing a crash. The way the unit group was becoming dead is also really tricky stuff because the group was dying as the attack_area command was being set because that command requires AttackBehavior and GotoBehavior but when GotoBehavior was querying the AI pathfinder it was rejected causing the GotoBehavior to immediately fail causing the group to be destroyed. For 1.1.81 i made a fix that when a Group command activates in the composite command, it verifies that the unit group is still alive before spawning a GroupBehavior.

UberKitten
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Apr 17, 2023 8:11 am

Re: [boskid][1.1.80] Crash shortly after loading save (Commandable::findDistraction)

Post by UberKitten »

Thanks for the write-up! I was (un)lucky to get the reproducible crash, glad it helped pinpoint the issue.

Post Reply

Return to “Resolved Problems and Bugs”