Skip to content

Mutagen crafting segfault #1171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
origamiwolf opened this issue May 24, 2013 · 6 comments
Closed

Mutagen crafting segfault #1171

origamiwolf opened this issue May 24, 2013 · 6 comments
Labels
<Bug> This needs to be fixed
Milestone

Comments

@origamiwolf
Copy link
Contributor

If you have 2 stacks containing 2 tainted meats each, the mutagen crafting process will segfault. It looks as though it applies the iterator to the first stack, which then crashes after it has run through the two tainted meats in the first stack.

This doesn't seem to happen when crafting with components with charges though.

@HeatherSoron
Copy link
Contributor

Seems to happen with any recipe that uses spoilable items (and maybe others) from two different stacks. Not sure WHY, though.

@atomicdryad
Copy link
Contributor

This happened when I tried to craft inactive turret while possessing two mysteriously de-stacked RAM items, which I attributed to my stubborn insistence of converting a 2 month old game through all the save-breaking commits. Seems like the same issue:

(gdb) bt
#0 0xb7816367 in std::string::size() const () from /usr/lib/libstdc++.so.6
#1 0x0836516e in inventory::use_amount (this=0xb75db97c, it=..., quantity=1, use_container=false)
at inventory.cpp:846
#2 0x08a7bf5a in player::use_amount (this=0xb75db474, it=..., quantity=2, use_container=false)
at player.cpp:4127
#3 0x08189ce2 in game::consume_items (this=0xb7598008, components=...) at crafting.cpp:1269

@HeatherSoron
Copy link
Contributor

Yeah, that looks like the same stack trace I had, and inventory.cpp:846 is the same line as I had encountered. Okay, so it's ANY item that's split across multiple stacks, good to know.

@HeatherSoron
Copy link
Contributor

Okay, interesting finding: I set a breakpoint inside inventory::use_amount (the place where the actual crash is happening), and checked how many items in my inventory - 7. When I made vegetable soup, with the veggies spread across 2 stacks, items.size() == 6. When I made cooked veggies, with the exact same inventory contents (saved right before the crafting attempts), items.size() == 7.

I don't think that's supposed to be happening.

@Stevensonz
Copy link
Contributor

Mostly having crashes with vegetable material related cooking (Spaghetti Al Pesto is number 1 and Fruit-pies :'( game won't let me make them due to crashing. Having same items of different stacks of caused it to crash.

@HeatherSoron
Copy link
Contributor

Closed by #1268.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed
Projects
None yet
Development

No branches or pull requests

4 participants