Open 1l0 opened 6 years ago
Which version of godot-go are you using? It should not crash as of git version 69f026d512f5e5b3a8c10798b7a56d5761a70b09
.
Right now there is an open issue with instancing nodes. The latest version shouldn't crash with the Dodge the Creeps example.
In the future, if you want to get more debug information, you can do the following:
Compile Godot with debug symbols:
git clone https://github.com/godotengine/godot.git
git fetch && git checkout 3.0
scons platform=<osx/x11> target=debug --jobs 4
Then run Godot with GDB to catch any crashes or segfaults. You can install GDB with brew, then you can run the debug version of Godot with GDB:
gdb godot
Then set following forked processes and run Godot in GDB:
(gdb) set follow-fork-mode child
(gdb) run
Now if you experience a segfault, you can print a backtrace with bt
:
#0 0x0000555557575e10 in Vector<SceneState::NodeData>::_get_size (this=0x148) at core/vector.h:61
#1 0x000055555757326c in Vector<SceneState::NodeData>::size (this=0x148) at core/vector.h:113
#2 0x0000555557565306 in SceneState::can_instance (this=0x0) at scene/resources/packed_scene.cpp:45
#3 0x0000555557571002 in PackedScene::can_instance (this=0x55555a0e4c70) at scene/resources/packed_scene.cpp:1670
#4 0x00005555562ec0e2 in MethodBind0RC<bool>::ptrcall (this=0x555559d88240, p_object=0x55555a0e4c70, p_args=0x55555a237380, r_ret=0xc420173a0c) at core/method_bind.gen.inc:565
#5 0x00005555564ba4ec in godot_method_bind_ptrcall (p_method_bind=0x555559d88240, p_instance=0x55555a0e4c70, p_args=0x55555a237380, p_ret=0xc420173a0c) at modules/gdnative/gdnative/gdnative.cpp:69
#6 0x00007fffd64093c8 in runtime.asmcgocall () at /usr/share/go-1.10/src/runtime/asm_amd64.s:688
#7 0x0000000000000810 in ?? ()
#8 0x0000000000000000 in ?? ()
godot-go repo version:
$ git log -n 1
commit 69f026d512f5e5b3a8c10798b7a56d5761a70b09 (HEAD -> master, origin/master, origin/HEAD)
Author: William Edwards <shadowapex@gmail.com>
Date: Thu Mar 15 23:36:49 2018 -0700
Update README
Thanks for an introduction of the GDB stuff I will give it a try.
Hi @1l0 ,
Thanks for providing the version of godot-go you're using. It's interesting that it crashed for you. Would you be able to try running it with GDB and posting the backtrace?
The app could be launched and the player could be controlled,
but after a couple of seconds the app will crash.
Go version: go1.10 darwin/amd64
Godot version: 3.0.2.stable.official or 3.0.0.stable.official