Game crashes, providing a segmentation fault error when trying to open inventory, activate items, or any activity that utilizes items in the players inventory. this began after picking up a shoulder strap.
open inventory or try to activate, throw, or reload an item (or any similar action involving the player's inventory)
Game should not crash upon taking the stated action
Crash and Debug
Crash and Debug.zip
I have a similar problem in my own game and did some investigation. In my case, if I unload a weapon that is in my inventory and then open the inventory, or if I unload a weapon to the ground and then examine the tile or list all items, I get a segfault.
I tried to reproduce in a test world but it didn't crash there, so I spawned a M4A1 in my world to compare it with my own.
The difference is that only one of them has fouling:
Hence, I think this is related to #41048: unloading a weapon that was obtained before this PR seems to produce a segfault.
EDIT:
I did some more testing, and while I could fix the problem in my game by spawning new weapons from the debug menu (and destroying the old ones), this doesn't fix the shoulder strap problem.
I could however find the steps to reproduce:
I can confirm that weapon mods are "corrupting" guns when you save and reload. They appear to not have any attachments and segfault either when unloading or after unloading and opening the inventory.
Most helpful comment
I have a similar problem in my own game and did some investigation. In my case, if I unload a weapon that is in my inventory and then open the inventory, or if I unload a weapon to the ground and then examine the tile or list all items, I get a segfault.
I tried to reproduce in a test world but it didn't crash there, so I spawned a M4A1 in my world to compare it with my own.
The difference is that only one of them has fouling:
Hence, I think this is related to #41048: unloading a weapon that was obtained before this PR seems to produce a segfault.
EDIT:
I did some more testing, and while I could fix the problem in my game by spawning new weapons from the debug menu (and destroying the old ones), this doesn't fix the shoulder strap problem.
I could however find the steps to reproduce: