Skip to content
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

fixed item location load failure fallback #75441

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

PatrikLundell
Copy link
Contributor

Summary

None

Purpose of change

Fix #75439, i.e. item_location target loss recovery leading to crash.

Describe the solution

Replace fallback's usage of an extreme position ( tripoint_min) for the place where an item is placed to use the location at which the parent that couldn't be located was placed (the item is supposed to drop to the ground). At a guess, this position is set to something reasonable for the other usages of the ptr.reset operation, but not in this fallback case.

Describe alternatives you've considered

Testing

The bug report's save doesn't crash anymore. However, I have no idea what the item that's supposed to drop is, and I don't find any items at (65, 69, 0) where the parent container was supposed to reside. Thus, I can't really verify it works as intended, only that it no longer crashes.

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Aug 4, 2024
@chphilli
Copy link

chphilli commented Aug 4, 2024

That fix was so fast! Thanks!

@chphilli
Copy link

chphilli commented Aug 4, 2024

Is there something I can do to re-run this build? Looks like it failed with the container or host running out of space?

@akrieger
Copy link
Member

akrieger commented Aug 4, 2024

It's not a required build so it's fine.

@dseguin dseguin merged commit 90e4179 into CleverRaven:master Aug 4, 2024
23 of 28 checks passed
@chphilli
Copy link

chphilli commented Aug 5, 2024

@PatrikLundell thanks for the fix! My save works again!

@PatrikLundell PatrikLundell deleted the item_location branch August 5, 2024 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"item_location lost its target item during a save/load cycle" error after crash leads to crash cycle
4 participants