CleverRaven / Cataclysm-DDA

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

Seg Fault upon Connecting Two Vehicles with Tow Cable #71412

Closed ShnitzelX2 closed 9 months ago

ShnitzelX2 commented 9 months ago

Describe the bug

Connecting two vehicles together with a tow cable, removing the cable, and then again connecting them causes a segmentation fault. Also, whether attaching the cable to a vehicle works or not seems inconsistent.

Attach save file

Mishicot-trimmed.tar.gz

The save file isn't necessary, you should be able to do this in a new world.

Steps to reproduce

  1. Spawn two sedans, as oriented in the attached screenshot.
  2. Attach a heavy-duty tow cable first to the headlight of the north sedan (highlighted in red on the screenshot) for towing. (NOTE: often this will be rejected by the game with "You can't attach a tow-line to a racked part", seemingly randomly for either vehicle but often for both. I'm not sure if this is also a bug. Try this process a couple times.)
  3. Attach the other end to the front of the south sedan (highlighted in blue on the screenshot).
  4. Remove the tow cable from the north sedan.
  5. Repeat step 2; this crashes the game.

Expected behavior

I expected either the cars to connect or to be rejected for connecting the cars in the wrong spot on the vehicle.

Screenshots

towcable_bug

Versions and configuration

Additional context

crash.log debug.log

While this bug is reproduced here with spawned vehicles, it did occur naturally in a different world of mine the first time I tried to connect two vehicles with a tow cable. Since it's easily reproducible, I didn't bother including that save file.

PatrikLundell commented 9 months ago

/confirmed

Thus, there are two errors here:

Kamayana commented 9 months ago

I'll look into this.