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

Items are wiped when loading a save file. #324

Closed
NQNStudios opened this issue Jan 25, 2023 · 5 comments
Closed

Items are wiped when loading a save file. #324

NQNStudios opened this issue Jan 25, 2023 · 5 comments
Labels
bug core Affects core systems other than dialogs
Milestone

Comments

@NQNStudios
Copy link
Collaborator

On Linux, when I create a new party in-game, save, close the game, open it and load the party, they won't have any items.

The same goes for opening any party in the character editor.

@CelticMinstrel
Copy link
Member

This bug is quite mystifying. As far as I can tell, it goes wrong right here:

real_univ = std::move(univ);

But how it can possibly go wrong there, I've yet to figure out.

@CelticMinstrel CelticMinstrel added bug core Affects core systems other than dialogs labels Jan 25, 2023
@CelticMinstrel CelticMinstrel added this to the 2.0 milestone Jan 25, 2023
@NQNStudios
Copy link
Collaborator Author

I put a breakpoint on that line and the debugger didn't stop at it. Maybe that's not where it goes wrong?

@NQNStudios
Copy link
Collaborator Author

Ah the breakpoint worked when I put in on the corresponding line in the v2 function.

@NQNStudios
Copy link
Collaborator Author

NQNStudios commented Jan 27, 2023

More specifically, it goes wrong when the adventurers array is swapped, like we talked about on IRC:

swap(lhs.adven, rhs.adven);

In my debugger when I open the party, I'm actually finding that a breakpoint on that line triggers TWICE. The first time, items are preserved. The second time, they get wiped. Are we expecting it to be called twice?

(Edit: I'm using this debugger Watch expression to monitor the items: univ.party.adven[0]->items[0])

@CelticMinstrel
Copy link
Member

Fixed in #328.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core Affects core systems other than dialogs
Projects
None yet
Development

No branches or pull requests

2 participants