Skip to content

Disable main_thread_id assertion for Android debug build #780

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

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion godot-ffi/src/binding/single_threaded.rs
Original file line number Diff line number Diff line change
@@ -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",