-
-
Notifications
You must be signed in to change notification settings - Fork 20.9k
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
Crash on C# exception while reloading assemblies #65032
Comments
You are not entirely correct about this, it's true that this method can return null but we do guard calls to this method with a call to godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs Lines 106 to 109 in 8c7be63
The I have been unable to reproduce the crash (with Godot built from commit 3cf16c959) but I do get an error in the console with the C# exception:
This is caused by the generated code that handles the restoring of a class when reloading assemblies. When reloading assemblies we replace script instances with placeholders to keep their state while we dispose of the old instance, when the assemblies have been reloaded we can instantiate the script again but if the class is not a |
@codecat Are you still able to reproduce this issue in Godot 4.0 RC2 or any later release? |
I am not working on the particular project that I was anymore, but I just tested the reproduction project on RC2 and it doesn't seem to crash anymore for me. 👍 |
Godot version
v4.0.alpha.mono.custom_build [0b8a63e]
System information
Windows 11, Vulkan, 3080
Issue description
When I build a C# project that generates an exception in the editor, it crashes the editor inside of
godotsharp_internal_script_debugger_send_error
becauseEngineDebugger::get_script_debugger()
returns null, and this is not checked.Steps to reproduce
addons/crash_test/CrashGizmoPlugin.cs
, changeif (true) {
toif (false) {
Minimal reproduction project
CrashTest20220829.zip
The text was updated successfully, but these errors were encountered: