Skip to content

Prevent crash when detaching freed debugger#119992

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
KoBeWi:typical_ObjectID_to_prevent_crash
Jun 3, 2026
Merged

Prevent crash when detaching freed debugger#119992
Repiteo merged 1 commit into
godotengine:masterfrom
KoBeWi:typical_ObjectID_to_prevent_crash

Conversation

@KoBeWi

@KoBeWi KoBeWi commented Jun 3, 2026

Copy link
Copy Markdown
Member

What problem(s) does this PR solve?

Additional information

My assessment was not entirely accurate. The actual cause of the crash is that EditorDebuggerNode was doing the cleanup after debuggers were already freed, so the invalid pointer was in EditorDebuggerSession holding reference to the freed debugger. This unfortunate order is determined by scene tree, so I just opted to add an ObjectID for the debugger as an extra safeguard.

The issue still can be prevented by properly deregistering the plugins.

@akien-mga akien-mga added this to the 4.7 milestone Jun 3, 2026
@Repiteo Repiteo merged commit bbd3f43 into godotengine:master Jun 3, 2026
20 checks passed
@Repiteo

Repiteo commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@KoBeWi KoBeWi deleted the typical_ObjectID_to_prevent_crash branch June 3, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment