Closed hhyyrylainen closed 2 weeks ago
I tried to use the mitigation in my real project, but it did not work. I suspect there is something in general wrong with InputMap.ActionGetEvents
, or either InputMap.ActionEraseEvents
and InputMap.ActionEraseEvents
.
Can not get this issue to work on master branch bdc0316 with Godot.NET.Sdk.4.3.0-dev.6. Even if I put your code into a _Process() and then close the window I get no crash. I use arch btw. Or maybe I am just generally doing something wrong
I re-tested with Godot Engine v4.3.dev6.mono.official.64520fe67
and found out that the bug now only happens when directly running the game. So for example if I run ./Godot_v4.3-dev6_mono_linux.x86_64 --path /home/hhyyrylainen/Projects/Thrive/ --editor
to open the godot editor and hit play, I don't see the crash on shutdown. But if I run ./Godot_v4.3-dev6_mono_linux.x86_64 --path /home/hhyyrylainen/Projects/Thrive/
(so without the --editor
flag) I see the crash still when shutting down:
================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.dev6.mono.official (64520fe6741d8ec3c55e0c9618d3fadcda949f63)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib64/dotnet/shared/Microsoft.NETCore.App/8.0.4/libcoreclr.so(+0x606a55) [0x7fc783406a55] (??:0)
[2] /usr/lib64/dotnet/shared/Microsoft.NETCore.App/8.0.4/libcoreclr.so(+0x606085) [0x7fc783406085] (??:0)
[3] /lib64/libc.so.6(+0x3e9a0) [0x7fc7d83a99a0] (??:0)
[4] ./Godot_v4.3-dev6_mono_linux.x86_64() [0x4a0c6b2] (??:0)
[5] ./Godot_v4.3-dev6_mono_linux.x86_64() [0xb94cc2] (??:0)
So it does look like there's a partial fix for this issue in Godot 4.3
Thanks, got it on a second try. Will inspect it a bit later.
Tested versions
Update: also reproducible now in the 4.2.2.mono full release.
System information
Fedora 39, probably not related to rendering or GPU
Issue description
Calling the C# Godot API
InputMap.ActionGetEvents()
with aStringName
fromInputMap.GetActions()
causes the following crash on shutdown:The more times I call
InputMap.ActionGetEvents
the more likely the crash is. Just accessing one value doesn't cause a crash very often, but already at 2 I get pretty regular crashes. With 3 I get almost always a crash. The sample code I set it to take 10 items which seems to always crash in a debugger. Using a value over 50 seems to have a good chance to crash even when not using a debugger.Also if I use the following code to not reuse the StringName instance, the crash goes away (note the
GC.Collect
is required to not cause a crash):With fewer StringNames used the crash is less consistent and sometimes I've observed these other places where the crash happens:
And:
Steps to reproduce
ui_
input actions)A more tweakable example of the code causing a crash is this:
Minimal reproduction project (MRP)
GodotTestProject.zip