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

Unclean Level Shutdown #78

Open
alochmann opened this issue Aug 10, 2022 · 0 comments
Open

Unclean Level Shutdown #78

alochmann opened this issue Aug 10, 2022 · 0 comments

Comments

@alochmann
Copy link
Contributor

When a level is deleted from memory (e.g. when the level ends or the app is shut down), level.reset() is called. This first sets the pointer "level" is pointing to to null, then deletes the world. However, we sometimes have to call DisposeObject during world deletion, which in turn refers to "level"; which has just been set to null. To avoid segfaults, we provide level with a new world instead. This method might have unexpected side effects: E.g. when unnaming an object during its deletion, it will search its name in the new world's catalogue instead of the old world's.

As of 2022, there are no known symptoms. Cleaning the code involves reworking all destructors. So we defer the repairs.

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

No branches or pull requests

1 participant