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 GDScriptCache to not remove scripts/scenes individually when clearing #69865

Merged

Conversation

adamscott
Copy link
Member

Split PR from #69587 for everything about GDScriptCache.

Should prevent GDScript::~GDScript() instances to call GDScriptCache::remove_script() when the GDScript was destructed because GDScriptCache::clear() erased the hashmap. Otherwise, GDScriptCache::remove_script() will call erase() on the hashmap, causing a crash or a heap-use-after-free error.

Fixes #69183 (Crash on exit in the GDScript module when debugging Godot) (hopefully)

@akien-mga akien-mga merged commit 561bafe into godotengine:master Dec 10, 2022
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga added this to the 4.0 milestone Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on exit in the GDScript module when debugging Godot
2 participants