weatherfactory / cultistsimulator-visible

Read-only preview builds of Cultist Simulator for the convenience of modders and the curious.
https://weatherfactory.biz/cultist-simulator/
36 stars 6 forks source link

Crash moving between cities #166

Closed alexiskennedy closed 2 years ago

alexiskennedy commented 2 years ago

"Game broke as I bid farewell to Marrakesh in the Exile gamemode."

hs #6642

Save files attached. Log suggests something shonky around sphere filtering.

Attachments.zip

alexiskennedy commented 2 years ago

Attachments.zip Same issue here, I think

Chelnoque commented 2 years ago

(notes to self)

Distilled version: save.zip

The crash will occur only if you're on triple speed - execution of both verbs in a single heartbeat does something. Quick patch is to get rid of Linq here, but I suspect the problem here is a symptom of something more profound. Additionally, even if there's no crash, the purged rkx verb still spawns a Foe, which is most 100% surecertain thing is not an intended behaviour.

(you know, when you design this kind of timestep-based systems, you always think "ehh, timers can overlap, but what are the odds of that ever leading to noticeable gameplay consequences?" here they are - the odds)

alexiskennedy commented 2 years ago

I went with the heartbeat approach because I was wary of race conditions, and it's generally been useful that things happen in one atomic step. But it has brought up problems.

Do you want to try increasing the frequency of the heartbeat and see if that helps? This wouldn't fix the underlying problem, and of course it might have perf implications, but it might be a guard against similar problems in future.