You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproducible in all 4.2 and 4.3 version (including 2e5d233) I have tested (self-built from this repo and downloadable releases).
System information
Linux my-laptop 6.5.0-25-generic #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Issue description
Not every, but some exceptions I throw cannot be caught and the corresponding catch block is not executed. This is only reproducible in direct or indirect executed code of a C# _Ready() method and only when it is executed as a follow of the node being added from a dynamically loaded PackedScene and won't happen in non-Debug mode:
using System;using Godot;namespace Game;publicpartialclassThrowingNode:Control{publicoverridevoid_Ready(){// Round #1try{thrownew ArithmeticException("foobar");}catch(ArithmeticException){
Console.WriteLine("Caught Round #1");// Won't land here if using dotnet of a version before 8.0.204}// Round #2try{
Convert.ToDouble("");}catch(Exception){
Console.WriteLine("Caught Round #2");// Won't land here if using dotnet of a version starting 8.0.204}}}
This issue hurts a lot: I cannot Debug anything any more, because the Godot app closes (crashes?) every single time on Debug when throwing the exception.
Jetbrains Rider will directly exit Godot and won't even stop before throwing the exception (Details). VS Code, will get its started Debug Godot runtime frozen.
Convert.ToDouble("") should throw a FormatException and in other error cases an OverflowException. Interestingly, throwing those directly won't trigger the crash: They get caught. Only when causing Convert.ToDouble(...) to fail, it crashes and, like before, the debugger won't stop at all at exception. This happens with 8.0.204.
$ dotnet sdk check
.NET SDKs:
Version Status
------------------------
8.0.204 Up to date.
Try out the newest .NET SDK features with .NET 9.0.100-preview.2.24157.14.
.NET Runtimes:
Name Version Status
------------------------------------------------------
Microsoft.AspNetCore.App 8.0.4 Up to date.
Microsoft.NETCore.App 8.0.4 Up to date.
The latest versions of .NET can be installed from https://aka.ms/dotnet-core-download. For more information about .NET lifecycles, see https://aka.ms/dotnet-core-support.
Issue is reproducible with any Net version (6.0, 7.0, 8.0):
<TargetFramework>net8.0</TargetFramework>
Steps to reproduce
Download the attached project
Run the project in DEBUG
Press O (the letter) key
Notice crash/freeze (or if not reproducible in your environment Caught Round #1 and Caught Round #2 in the console output)
I'm unable to reproduce this with 4.2.1.stable.mono.official.b09f793f5 on Linux using the 🕹 Debug Game configuration in VSCode.
Try launching Godot with the --verbose flag to see if you get more details on crashing. If you are able to build Godot, build it with dev_build=yes and debug_symbols=yes.
Tested versions
System information
Linux my-laptop 6.5.0-25-generic #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Issue description
Not every, but some exceptions I throw cannot be caught and the corresponding catch block is not executed. This is only reproducible in direct or indirect executed code of a C#
_Ready()
method and only when it is executed as a follow of the node being added from a dynamically loadedPackedScene
and won't happen in non-Debug mode:This issue hurts a lot: I cannot Debug anything any more, because the Godot app closes (crashes?) every single time on Debug when throwing the exception.
Jetbrains Rider will directly exit Godot and won't even stop before throwing the exception (Details).
VS Code, will get its started Debug Godot runtime frozen.
Convert.ToDouble("")
should throw aFormatException
and in other error cases anOverflowException
. Interestingly, throwing those directly won't trigger the crash: They get caught. Only when causingConvert.ToDouble(...)
to fail, it crashes and, like before, the debugger won't stop at all at exception. This happens with8.0.204
.Console output:
Dotnet:
Issue is reproducible with any Net version (6.0, 7.0, 8.0):
Steps to reproduce
O
(the letter) keyCaught Round #1
andCaught Round #2
in the console output)Minimal reproduction project (MRP)
throwing-demo2.zip
The text was updated successfully, but these errors were encountered: