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
Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 980 Ti (NVIDIA; 32.0.15.6603) - 13th Gen Intel(R) Core(TM) i7-13700K (24 Threads)
Issue description
Calling Variant::iter_get on an empty Array causes this crash, but only in release builds of the godot-cpp GDExtension:
Godot Engine v4.3.stable.official.77dcf97d8 - https://godotengine.org
Vulkan 1.3.289 - Forward Mobile - Using Device #0: NVIDIA - NVIDIA GeForce GTX 980 Ti
ERROR: FATAL: Index p_index = 0 is out of bounds (size() = 0).
at: get (./core/templates/cowdata.h:205)
I cannot reproduce this release-only behaviour on builds of the Godot editor, so it appears to only behave this way on release builds of GDExtension.
This issue also happens with other types of Array, such as PackedVector4Array. This makes me suspect that this sort of behaviour could exist elsewhere in GDExtension...
Godot version
v4.3.stable.official [77dcf97d8]
godot-cpp version
4.3 56571dc
System information
Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 980 Ti (NVIDIA; 32.0.15.6603) - 13th Gen Intel(R) Core(TM) i7-13700K (24 Threads)
Issue description
Calling
Variant::iter_get
on an emptyArray
causes this crash, but only in release builds of the godot-cpp GDExtension:I cannot reproduce this release-only behaviour on builds of the Godot editor, so it appears to only behave this way on release builds of GDExtension.
This issue also happens with other types of
Array
, such asPackedVector4Array
. This makes me suspect that this sort of behaviour could exist elsewhere in GDExtension...Steps to reproduce
Write the following code:
Variant arrayAsVariant = Array(); Variant iterator; bool iter_valid; arrayAsVariant.iter_init(iterator, iter_valid); Variant value = arrayAsVariant.iter_get(iterator, iter_valid);
Compile with
scons dev_build=yes
and note that there are no issues, warnings, or errors and value isnull
.Compile with
scons target=template_release
and note that the error and crash occur.Minimal reproduction project
Here is an example GDExtension:
release-only-gdextension-crash.zip
scons dev_build=yes
andscons target=template_release
to generate GDExtension DLL filesdemo
folderHere is my compiler info:
Using SCons-detected MSVC version 14.3, arch x86_64
The text was updated successfully, but these errors were encountered: