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

Segfault when setting References via the default setter #272

Closed
Windfisch opened this issue Apr 15, 2019 · 0 comments
Closed

Segfault when setting References via the default setter #272

Windfisch opened this issue Apr 15, 2019 · 0 comments

Comments

@Windfisch
Copy link
Contributor

Commit 01606fa introduced the following bug for me:
My class has a Ref<Mesh> property with the default setter/getter functions. Since aforementioned commit, my Game instantly segfaults with the stack trace attached below.
Reverting 01606fa makes everything work again.

Thread 1 "godot.x11.tools" received signal SIGSEGV, Segmentation fault.
0x000000000175110f in godot_method_bind_ptrcall (p_method_bind=0x0, p_instance=0x6dfaa50, p_args=0x7fffffffd6c0, p_ret=0x7fffffffd6bf)
    at modules/gdnative/gdnative/gdnative.cpp:69
69              mb->ptrcall(o, p_args, p_ret);
(gdb) bt
#0  0x000000000175110f in godot_method_bind_ptrcall (p_method_bind=0x0, p_instance=0x6dfaa50, p_args=0x7fffffffd6c0, p_ret=0x7fffffffd6bf)
    at modules/gdnative/gdnative/gdnative.cpp:69
#1  0x00007fffec7c610d in godot::___godot_icall_bool (inst=<optimized out>, mb=<optimized out>) at include/gen/__icalls.hpp:5403
#2  godot::Reference::reference (this=<optimized out>) at src/gen/Reference.cpp:34
#3  0x00007fffec7ad2b8 in godot::Ref<godot::Mesh>::ref (p_from=..., this=0x7fffffffd6e0) at godot-cpp/include/core/Ref.hpp:175
#4  godot::Ref<godot::Mesh>::Ref (p_variant=..., this=0x7fffffffd6e0) at godot-cpp/include/core/Ref.hpp:168
#5  godot::_ArgCast<godot::Ref<godot::Mesh> >::_arg_cast (a=...) at godot-cpp/include/core/Godot.hpp:78
#6  godot::_PropertyDefaultSetFunc<godot::Visualizer, godot::Ref<godot::Mesh> >::_wrapped_setter (object=<optimized out>, method_data=0xc133e40, 
    user_data=0xc4f0770, value=<optimized out>) at godot-cpp/include/core/Godot.hpp:290
#7  0x0000000001757490 in NativeScriptInstance::set (this=0xc35d840, p_name=..., p_value=...) at modules/gdnative/nativescript/nativescript.cpp:571
#8  0x000000000354d4ba in Object::set (this=0xc55e480, p_name=..., p_value=..., r_valid=0x7fffffffda68) at core/object.cpp:413
#9  0x0000000002faa253 in SceneState::instance (this=0xc387a40, p_edit_state=SceneState::GEN_EDIT_STATE_DISABLED)
    at scene/resources/packed_scene.cpp:254
#10 0x0000000002fb4b0f in PackedScene::instance (this=0xc52e570, p_edit_state=PackedScene::GEN_EDIT_STATE_DISABLED)
    at scene/resources/packed_scene.cpp:1699
#11 0x0000000001335afd in Main::start () at main/main.cpp:1736
#12 0x00000000012fa8ff in main (argc=1, argv=0x7fffffffe788) at platform/x11/godot_x11.cpp:54

(The line numbers are relative to Godot f75b9e62468ba65753f2ce49c02f1a129c08b717, btw)

RameshRavone added a commit to RameshRavone/godot-cpp that referenced this issue Apr 21, 2019
karroffel added a commit that referenced this issue Apr 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant