-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Segmentation fault on exit in Time destructor #12
Comments
Yeah I could reproduce this upstream with: diff --git a/test/src/example.cpp b/test/src/example.cpp
index 3ec8bca..89e5d12 100644
--- a/test/src/example.cpp
+++ b/test/src/example.cpp
@@ -11,6 +11,7 @@
#include <godot_cpp/classes/label.hpp>
#include <godot_cpp/classes/multiplayer_api.hpp>
#include <godot_cpp/classes/multiplayer_peer.hpp>
+#include <godot_cpp/classes/time.hpp>
#include <godot_cpp/variant/utility_functions.hpp>
using namespace godot;
@@ -297,6 +298,8 @@ Example::~Example() {
// Methods.
void Example::simple_func() {
+ int time = Time::get_singleton()->get_ticks_msec();
+ printf("time: %d\n", time);
emit_custom_signal("simple_func", 3);
}
I'll open an issue on godot-cpp. Feel free to close this as an upstream bug, unless you want to work it around downstream to avoid the crash. |
Thanks for the report! Yeah, it's well known at this point, but having an official issue on this here is a good thing. I'll keep it open as a reminder, because indeed I may have to work around it on GDSiON's end using mihe's suggestion. I'll just transfer this to the GDSiON repo, since there is nothing that can be done in Bosca Ceoil's code. |
godotengine/godot-cpp#1458 resolves the crash, so a workaround is not necessary. But I can't update to a newer version of godot-cpp just yet because no official build of 4.3 is compatible with it (see PackedVector4Array changes). So will have to wait until beta 1 or 2. Keeping it open in the meantime. |
When testing boscaceoil-blue with self-compiled gdsion and latest upstream Godot, I get a segfault on exit (just running the project, not doing anything and quitting with the
X
window button triggers it).The stacktrace isn't super helpful:
I'm using
dev_build
s for both Godot and GDSiON but can't seem to get more details from gdb. I'm not sure if it's not able to load debug symbols from the shared library or if it's something else.Might very well be a Godot or godot-cpp bug, but starting with a downstream report until we can assess where the crash comes from.
The stacktrace mentions the
Time
destructor, and I see it's indeed used by GDSiON:Presumably removing this
Time::get_singleton()
dependency might "solve" the issue. I'll see if I can make a MRP usingTime::get_singleton()
that crashes similarly so we can move the bug report upstream.The text was updated successfully, but these errors were encountered: