Error about invalid ammo

I also posted this in reddit, but didn’t get a response, figured I’d try here too.

Hey everyone. I just updated to 9217 recently, and now I’m getting a fatal crash when trying to search inventory in one of my cargo holds in my vehicle. It happens when I open advanced inventory management screen. The version I was on last week had some warnings about invalid ammunition and I could just ignore them, but now it’s a fatal crash.

Doing a bit more debugging I found it only happens when I use the advanced inventory “/“. It gives me a lot of errors whenever I’m in my vehicle. It seems to only do it in my vehicle, and sometimes I get a slightly different error depending on which cargo spaces are next to me. Maybe something that is loaded, like a repair kit, etc.? Normal "g"et command seems to work fine on all the adjacent squares.

Here’s the debug.log:


18:06:10.404 : Starting log.

18:06:10.404 INFO : Cataclysm DDA version 0.D-4929-gdd1dfac

18:06:10.483 INFO : Number of render drivers on your system: 4

18:06:10.483 INFO : Render driver: 0/direct3d

18:06:10.483 INFO : Render driver: 1/direct3d11

18:06:10.483 INFO : Render driver: 2/opengl

18:06:10.483 INFO : Render driver: 3/software

18:06:10.488 INFO : Language is set to: ‘en’

18:06:11.182 INFO : SDL version used during compile is 2.0.5

18:06:11.182 INFO : SDL version used during linking and in runtime is 2.0.5

18:06:11.306 INFO : Active renderer: 0/direct3d

18:06:11.670 INFO : USE_COLOR_MODULATED_TEXTURES is set to 0

18:06:11.992 WARNING : opendir [./mods/] failed with “No such file or directory”.

18:06:18.176 WARNING : opendir [./save/Bargersville/mods] failed with “No such file or directory”.


deleting due to website thinking I’m mentioning other users

(RtlUserThreadStart+0x21@0x7ff9aa721461[ntdll.dll+0x71461]),
Backtrace emission took 0 seconds.

src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:44.936 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:45.921 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:46.297 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:46.584 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:46.896 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:47.208 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:47.488 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:47.752 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:48.024 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:48.288 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

18:06:48.550 ERROR : src/ammo.cpp:48 [const T& string_id::obj() const [with T = ammunition_type]] Tried to get invalid ammunition:

More debugging steps.

Found one tile that reproduces the error if I bring up advanced inventory management. There’s only a dozen things in there. Removed all items with ammo and dropped them on the ground away from the vehicle. Same issue happens. Removed items one by one and found that individual items don’t cause the issue. Only when 2 are more are in the same pile.

Also tried rolling back to my previous revision. There I only get warnings, but no fatal errors when in the vehicle. However, after about an hour of play unfortunately I got the error again.

At this point I’m afraid that my game may be beyond repair. I’m pretty sad about this as it was my longest lived survivor yet and was finally getting to some cool endgame stuff. Not sure if I have it in me to start over again as it took me ~1 month IRL to get to this point.

Any help greatly appreciated. Even if it’s just suggested debugging, or if someone would be willing to look at my savegame, I’d be happy to provide it.

Looks like your missing a mod, if you upload your save file I can try and help fix it, no promises though.

Thanks, I will upload tonight when I get home. Strange because I don’t even know how to load mods, I just use the defaults from the launcher.

But regardless, thanks in advance!

Here’s a link to my saved game. Billy is the character with the issue.

All help greatly appreciated!

fixed it for you (i debugged the carryweight trait, moved all your guns and ammo outside and put them back, and it worked for some reason) that error also stopped popping up.

try this:

Not sure if that fixed it or if repeatedly restarting after every crash during everything I tried bypassed it somehow, but i wasnt getting any errors or crashes afterwards.

1 Like

OK, that seems to be working better now, no more crashes. But I am still getting this warning when opening the advanced inventory tab. I can “i” ignore the message and it seems ok. Any ideas? It looks very similar to the error I was getting which makes me a bit nervous.

image

Oh, ignore the part about no inventory. I see you removed all my items I was carrying. the “/” command doesn’t show what you’re wearing. So I guess there’s just the warning messages left.

Did you put my items somewhere? If not, no worry, I can wish for them back, just wondering if they’re lying around somewhere.

Thanks for all the help BTW.

I put them all in the spot you had your ammo, I probably wasnt getting the error messages because I might have pressed I. Though that is the error message you got before, so maybe something that was in your inventory was causing the issue, or maybe one of the automated guns, I dont think the laser rifles are in the base game anymore but I havent played that far in for quite a while.

Thank you, I found them. It is strange that the crash is gone, but the warning is still present. I can spend an hour or two and see if things are more stable. According to the item browser, the A7 laser rifle is in the base game.

The whole thing just seems really weird. Like if I hit “/” on my left most floor trunk, no warning. Move one square to the right, I get the warning. Move one more square, no warning again. What’s odd about that is that the two tile without the warning completely cover all 9 square of the tile that does generate the warning. So it seems to be based on some kind of combination of items that the panel is bringing up. But why that would flag invalid ammo is a mystery to me.

Well, that didn’t take long. After 5 minutes, I got another crash.
So I tried a completely fresh install with latest version (9226), and played around for a bit with the advanced inventory screen and still got the warnings. I "i"gnored them, and again after a few minutes I was able to get the following segmentation fault again.

Yeah I tried multiple versions as well, but it’s definitely one or more items from that title that’s causing it, I would either search through it one by one to find the culprit and teleport it to somewhere I’d never go again, or remove all the items there all together (even if you debugger them back to see of the issue persist)

1 Like

Which tile do you think it is? I keep getting the warnings in seemingly random tiles in my vehicle. Definitely seems like it’s maybe in one or more of the vehicle spaces as it doesn’t happen elsewhere in the world.

Ok, I’m pretty convinced this is not just a single item issue. I just got it into a weird state where even with nothing around, just my inventory was causing the issue. Dropping items one by one, it went away when I dropped my zombie pheremones. But then picking back up my X-acto knife caused it to come back.

I dropped everything and tried three of the buggy tiles and it crashed again on me. One in the middle of the floor trunks, and another (I think it’s the tile with the bed), and one by the drivers side door (can’t isolate it).

I’m afraid this game is a goner. :’-(

I need to mourn for a while and decide if I really want to spin a whole new world and try again, or maybe just take an extended break…

It may be a bit too late, but I was having this exact issue. I unloaded my equipped weapon, and it seems to have fixed the issue. I’m not sure why that worked, but it’s worth a shot if this is still a concern.