Skip to content
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

Executing GDNativeLibrary.new().set_config_file(BoxShape.new()) crashes Godot #45997

Closed
qarmin opened this issue Feb 14, 2021 · 0 comments · Fixed by #47534
Closed

Executing GDNativeLibrary.new().set_config_file(BoxShape.new()) crashes Godot #45997

qarmin opened this issue Feb 14, 2021 · 0 comments · Fixed by #47534

Comments

@qarmin
Copy link
Contributor

qarmin commented Feb 14, 2021

Godot version:
Godot 3.2.4 rc 2

Issue description:
Executing(I know that this a little different than in title but this one works)

	var aa = BoxShape.new()
	GDNativeLibrary.new().set_config_file(aa)

crashes with backtrace

[1] /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f64d8a8e210] (??:0)
[2] HashMap<String, List<Pair<String const*, OrderedHashMap<String, Variant, HashMapHasherDefault, HashMapComparatorDefault<String>, (unsigned char)3, (unsigned char)8> >, DefaultAllocator>::Element*, HashMapHasherDefault, HashMapComparatorDefault<String>, (unsigned char)3, (unsigned char)8>::getptr(String const&) const (/mnt/Miecz/godot3.2/./core/hash_map.h:328)
[3] HashMap<String, List<Pair<String const*, OrderedHashMap<String, Variant, HashMapHasherDefault, HashMapComparatorDefault<String>, (unsigned char)3, (unsigned char)8> >, DefaultAllocator>::Element*, HashMapHasherDefault, HashMapComparatorDefault<String>, (unsigned char)3, (unsigned char)8>::has(String const&) const (/mnt/Miecz/godot3.2/./core/hash_map.h:285)
[4] OrderedHashMap<String, OrderedHashMap<String, Variant, HashMapHasherDefault, HashMapComparatorDefault<String>, (unsigned char)3, (unsigned char)8>, HashMapHasherDefault, HashMapComparatorDefault<String>, (unsigned char)3, (unsigned char)8>::has(String const&) const (/mnt/Miecz/godot3.2/./core/ordered_hash_map.h:241)
[5] ConfigFile::get_value(String const&, String const&, Variant) const (/mnt/Miecz/godot3.2/core/io/config_file.cpp:88)
[6] GDNativeLibrary::set_config_file(Ref<ConfigFile>) (/mnt/Miecz/godot3.2/modules/gdnative/gdnative.cpp:152 (discriminator 7))
[7] MethodBind1<Ref<ConfigFile> >::call(Object*, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/./core/method_bind.gen.inc:775 (discriminator 12))
[8] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/mnt/Miecz/godot3.2/core/object.cpp:919 (discriminator 1))
[9] Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) (/mnt/Miecz/godot3.2/core/variant_call.cpp:1129 (discriminator 1))
[10] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/mnt/Miecz/godot3.2/modules/gdscript/gdscript_function.cpp:1089)
[11] GDScriptInstance::_ml_call_reversed(GDScript*, StringName const&, Variant const**, int) (/mnt/Miecz/godot3.2/modules/gdscript/gdscript.cpp:1269)
[12] GDScriptInstance::call_multilevel_reversed(StringName const&, Variant const**, int) (/mnt/Miecz/godot3.2/modules/gdscript/gdscript.cpp:1278)
[13] Node::_notification(int) (/mnt/Miecz/godot3.2/scene/main/node.cpp:152)
[14] Node::_notificationv(int, bool) (/mnt/Miecz/godot3.2/./scene/main/node.h:46 (discriminator 14))
[15] CanvasItem::_notificationv(int, bool) (/mnt/Miecz/godot3.2/./scene/2d/canvas_item.h:166 (discriminator 3))
[16] Node2D::_notificationv(int, bool) (/mnt/Miecz/godot3.2/./scene/2d/node_2d.h:38 (discriminator 3))
[17] Object::notification(int, bool) (/mnt/Miecz/godot3.2/core/object.cpp:931)
[18] Node::_propagate_ready() (/mnt/Miecz/godot3.2/scene/main/node.cpp:197)
[19] Node::_propagate_ready() (/mnt/Miecz/godot3.2/scene/main/node.cpp:186 (discriminator 2))
[20] Node::_set_tree(SceneTree*) (/mnt/Miecz/godot3.2/scene/main/node.cpp:2560)
[21] SceneTree::init() (/mnt/Miecz/godot3.2/scene/main/scene_tree.cpp:464)
[22] OS_X11::run() (/mnt/Miecz/godot3.2/platform/x11/os_x11.cpp:3628)
[23] /usr/bin/godot(main+0x125) [0x16d2e6b] (/mnt/Miecz/godot3.2/platform/x11/godot_x11.cpp:57)
[24] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f64d8a6f0b3] (??:0)
[25] /usr/bin/godot(_start+0x2e) [0x16d2c8e] (??:?)
akien-mga pushed a commit that referenced this issue Mar 31, 2021
Fixes #45997.

Setting a GDNativeLibrary config file as null or any other object but a ConfigFile will now cause an error.

(cherry picked from commit 618dd89)
lekoder pushed a commit to KoderaSoftwareUnlimited/godot that referenced this issue Apr 24, 2021
Fixes godotengine#45997.

Setting a GDNativeLibrary config file as null or any other object but a ConfigFile will now cause an error.

(cherry picked from commit 618dd89)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants