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

fix: dangling pointer in mission when saving character data #1183

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

EmosewaMC
Copy link
Collaborator

Fixes an issue where characters would lose mission progress due to a dangling pointer in mission data.
This was proven by adding a logging message to the destructor of all CD tables which revealed that when crashing, the tables and all their data are destroyed first and then character data is saved. This causes all missions to enter a state where their pointers are dangling and character data will enter an invalid state.

This is a quick patch to get character save data stable and remove the dangling pointer.

Tested that previously, I would lose my mission progress with 3 clients in world 1251 1 every time on multiple characters and after the patch I would never lose save data.

Image of save data with fragmented memory, as you can see, the missionID is a completely invalid number
image

@EmosewaMC
Copy link
Collaborator Author

Yes there are memory usage increases. player character safety >>>>> a bit of memory savings right now.

@DarwinAnim8or DarwinAnim8or merged commit 0337449 into main Aug 12, 2023
@EmosewaMC EmosewaMC deleted the fastcrashfixes branch August 12, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants