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

GD-503: Rework plugin exit to avoid system crash and memory leaks #504

Merged
merged 6 commits into from
Jun 19, 2024

Conversation

MikeSchulze
Copy link
Owner

@MikeSchulze MikeSchulze commented Jun 17, 2024

Why

The plugin has some issues to release resources at Godot exit and result sometimes in a segmentation fault under Linux

What

  • fix remove_child on free_instance to be called deferred now
  • removed the temporary free_fix workaround
  • fix orphan nodes in GdUnitTestDiscoverer
  • introduce a new flag to call deferred on free_instance at plugin exit

Godot bug related

godotengine/godot#92727

@MikeSchulze MikeSchulze self-assigned this Jun 17, 2024
@MikeSchulze MikeSchulze added bug Something isn't working refactoring Mark to refactoring a implementation godot related issue Its a bug by Godot engine and can't be fixed by GdUnit labels Jun 17, 2024
# Why
The plugin has some issues to release resources at Godot exit and result sometimes in a segmentation fault under linux

# What
- fix `remove_child` on `free_instance` to be called dederred now
@MikeSchulze
Copy link
Owner Author

@AnidemDex please check out this branch, and check if you run in errors or crashes.
I tested on Windows and macOS, the tests runs and when exit Godot no real errors I see, also no orphans on Windows, but leaked images on macOS only

@AnidemDex
Copy link

image

Segfault is no more

@MikeSchulze MikeSchulze merged commit 72560ef into master Jun 19, 2024
@MikeSchulze MikeSchulze deleted the GD-503 branch June 19, 2024 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working godot related issue Its a bug by Godot engine and can't be fixed by GdUnit refactoring Mark to refactoring a implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GD-503: Revisit plugin start and close to avoid loading and unloading errors
2 participants