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

Segmentation fault crash when using reaper #39069

Closed corsull closed 4 years ago

corsull commented 4 years ago

# Describe the bug

I have the vehicle mounted Reaper and the game crashes 95% of the time when used on my oat crop.

Edit: The other 5% of the time the reaper successfully "Harvests" the crops but the items vanish. Nothing in the vehicle inventory, nothing on the ground and no mention of running over something.

Steps To Reproduce

1.Climb in vehicle

  1. turn on reaper with vehicle controls 3.drive forward over the oat crops

Expected behavior

Reaper harvests the crops and deposits items either in the vehicle cargo spaces or on the ground (I'm not sure which it is suppose to do)

Screenshots

Reaper crash picture

Versions and configuration

Additional context

debug.zip Foosland2.zip

Qrox commented 4 years ago

Can you try reproducing it on the newest experimental? I cannot reproduce it on my end so it's probably already fixed.

corsull commented 4 years ago

Oh im pretty new to the game. I didn't realize I could change versions. I thought it might mess up the save. I'll try that when I get a chance

corsull commented 4 years ago

Nope. I Updated it and it still does the exact same thing. I have yet to try it on a different crop other than oats.

Do i need to resubmit all the data again and updated files and such?

Qrox commented 4 years ago

Yes, please upload the new crash/debug logs, and the version number of your updated game.

corsull commented 4 years ago

crash.zip Foosland2 problems.zip

Hopefully its not something that is just wrong with my computer.

And hopefully I updated that save correctly. I sorta had an issue because my game and save updated but i had hand harvested my crops. So I loaded the old save I posted here back in but it I think it was still on the old experimental version so I hit update to an earlier version then updated to the current one again. it seemed to work though.

Qrox commented 4 years ago

I was able to reproduce it on the official build but not on my own build (CMake/MinGW-w64). The crash was caused by a std::length_error thrown from iexamine::get_harvest_items, which was in turn caused by a use-after-free issue in vehicle::operate_reaper.

corsull commented 4 years ago

Ok. That means almost nothing to me since my knowledge of programming is almost non-existent. Is it something wrong with only my save?

I had another segmentation fault crash unrelated to the vehicle. I attempted the "reload" command on my mp3 player while it was playing. if I unloaded the existing battery first there was no crash. Im assuming that this new crash has nothing to do with the original reaper crash.

Qrox commented 4 years ago

No, it's a problem with the code, and I'm currently working on a fix for it. As for the other crash, please open a new issue to describe it, and provide the crash log and save file, thanks!