godot: .NET 6: The game crashes on System.AccessViolationException
Godot version
v4.0.beta1.mono.official [4ba934bf3]
System information
Windows 11, 3080Ti, Vulkan mobile
Issue description
I’m making a shooter game. When there are many node instances been created for bullets, the game player crashes with the following log printed in verbose mode:
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Godot.NativeInterop.NativeFuncs.godotsharp_variant_destroy(Godot.NativeInterop.godot_variant ByRef)
at Godot.NativeInterop.godot_variant.Dispose()
at Godot.Variant+Disposer.Dispose(Boolean)
at Godot.Variant+Disposer.Finalize()
Steps to reproduce
- Run godot with
--editor --verbose
- Open the attached project
- Run the game
- Hold left mouse button to start shooting knifes. Wait for a while (~ 20 seconds) and it’ll eventually crash.
- Check the terminal log for the error message. NO ERRORS ARE SHOWN in editor
Minimal reproduction project
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 6
- Comments: 18 (10 by maintainers)
Since beta 4 this constructor was replaced with a static method:
Callable.From
. (https://github.com/godotengine/godot/pull/67987)