Closed felixdollack closed 3 months ago
The code at rust/library/std/src/thread/local.rs:260:26
mentions that the function will panic if the destructor is running. @knopp, is there a way to avoid this or catch/ignore the error when I am closing the flutter app?
/// Acquires a reference to the value in this TLS key.
///
/// This will lazily initialize the value if this thread has not referenced
/// this key yet.
///
/// # Panics
///
/// This function will `panic!()` if the key currently has its
/// destructor running, and it **may** panic if the destructor has
/// previously been run for this thread.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn with<F, R>(&'static self, f: F) -> R
where
F: FnOnce(&T) -> R,
{
self.try_with(f).expect(
"cannot access a Thread Local Storage value \
during or after destruction",
)
}
encountering the same issue
any updates here? this is polluting our sentry @felixdollack did you manage to find a fix?
@alexvoina the problem seems to be resolved by upgrading to version 0.8.19
Running a minimal sample on macOS (Sonoma 14.5, Flutter 3.22.2, super_drag_and_drop 0.8.18) and immediately closing it leads to the following error:
Running with
export RUST_BACKTRACE=full
does not add any useful informationExpected: Closing the application does not throw an unexpected error.
Device crash log:
Edit 1: Add RUST_BACKTRACE=full output