-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Calling a C# interface method crashes Godot immediately #71175
Comments
The code in the MRP results in a stackoverflow because This is the output I get in the terminal when launching the Godot project in Linux:
I think what you are looking for is this: public partial class Test : IFoo
{
public void TestMethod()
{
base(IFoo).TestMethod();
}
} This feature was cut from C# 8.0 but the intention is to bring it back in a future version of the language, see https://github.com/dotnet/csharplang/blob/main/meetings/2019/LDM-2019-04-29.md#default-interface-implementations-and-base-calls. You can follow the Since this is not a Godot issue but a limitation of the C# language I'll close this issue. |
Hmm, even if I got the code wrong, I disagree that this is not an issue at all: the game should certainly not crash without so much as an error message. |
Unfortunately we don't have any control over stackoverflows, it's a special type of exception that can't really be catched. |
Godot version
4.0 beta10
System information
MacOS Catalina
Issue description
Calling an interface method crashes Godot immediately. The game closes with no stack trace.
Steps to reproduce
Put this code on any node:
Minimal reproduction project
https://github.com/johnfn/CsharpGodotCrashRepro
The text was updated successfully, but these errors were encountered: