CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.2k stars 4.11k forks source link

Seg Fault Crash in Bandit Camp #75365

Closed Grotato closed 3 weeks ago

Grotato commented 1 month ago

Describe the bug

Game crashes during combat in a bandit camp. The first three crashes occurred while fighting the first bandit, at seemingly no certain point, but then it crashed while engaging a second bandit after killing the first.

Attach save file

Roggen-trimmed.tar.gz

Steps to reproduce

  1. Load the attached save.
  2. Start a fight with the bandits in the camp south of the refugee center.
  3. At some point, likely while fighting the first bandit, the crash will occur.

Expected behavior

I expected the game to not crash while fighting the bandits. My save isn't very old, and I've only fought zombies thus far. The bandits are the first NPC's I've fought in this save, so the issue might not be specific to them.

Screenshots

No response

Versions and configuration

Additional context

crash.zip

darkgrifter commented 1 month ago

BombMagicMind-trimmed.tar.gz Mods crash.log

I have a similar segmentation fault, Steps to reproduce. 1: Spawn in 2: Hold the down arrow 3: ??? 4: Crash

PatrikLundell commented 1 month ago

Failed to reproduce, because bringing a mace to a gunfight results in death. A large number of mods weren't available on my machine, and have no idea how magic is supposed to work, so maybe magic might actually have given the bugger a chance? Anyway, managed to whack a bandit to death on the second attempt, but no crash before the death in either attempt.

Cddaplayer commented 1 month ago

Same bug here, when get close to some bandit, game crashed. crash.log

PatrikLundell commented 1 month ago

@darkgrifter's save is actually useful, as it provides a repeatable crash. So far I've seen it crash due to something throwing "The Historical Weaponsmith" (a book) and the code then trying to find the ammo in its magazine, which doesn't exist. This seems to be caused by the throw action bizarrely checking if friendly critters would be hit and stating that the ranged attack is not throwing. Hacking the code to flip that boolean to "true" causes the book to be thrown successfully. Even better, there was a swap_critters crash immediately after the successful book throw when testing that correction, so I've had a chance to attack that one too (but not test it, as I've failed to have it repeated).

RenechCDDA commented 3 weeks ago

Fixed by #75418, looks like