From 11b0ab7846fa90616fea720b148b64597735b4cf Mon Sep 17 00:00:00 2001 From: jeyum2 Date: Wed, 26 Jun 2024 18:26:11 +0900 Subject: [PATCH] Disable main_thread_id assertion for Android debug build This code block causes a runtime panic during initializing in Android debug builds Signed-off-by: Jan Haller --- godot-ffi/src/binding/single_threaded.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/godot-ffi/src/binding/single_threaded.rs b/godot-ffi/src/binding/single_threaded.rs index 271659aa4..fdcd4da6f 100644 --- a/godot-ffi/src/binding/single_threaded.rs +++ b/godot-ffi/src/binding/single_threaded.rs @@ -147,7 +147,8 @@ impl BindingStorage { // We only check if we are in the main thread in debug builds if we aren't building for a non-threaded Godot build, // since we could otherwise assume there won't be multi-threading. - #[cfg(all(debug_assertions, not(wasm_nothreads)))] + // TODO: figure out why the panic happens on Android, and how to resolve it. See https://github.com/godot-rust/gdext/pull/780. + #[cfg(all(debug_assertions, not(wasm_nothreads), not(target_os = "android")))] { let main_thread_id = storage.main_thread_id.get().expect( "Godot engine not available; make sure you are not calling it from unit/doc tests",