Problem
Screenpipe crashes daily with Failed to initialize ORT API panics during RF-DETR model initialization. Sentry shows ~174 crashes in the last 24h.
Root cause
The RF-DETR adapter calls ort::session::Session::builder() without panic handling. When ONNX Runtime initialization fails (missing drivers, corrupted binary, ABI mismatch after OS updates), the entire process crashes.
The speaker module already has proper panic handling in place but RF-DETR does not.
Solution
Wrap Session::builder() in panic catching similar to the speaker module's catch_panic_into_error pattern.
Problem
Screenpipe crashes daily with
Failed to initialize ORT APIpanics during RF-DETR model initialization. Sentry shows ~174 crashes in the last 24h.Root cause
The RF-DETR adapter calls
ort::session::Session::builder()without panic handling. When ONNX Runtime initialization fails (missing drivers, corrupted binary, ABI mismatch after OS updates), the entire process crashes.The speaker module already has proper panic handling in place but RF-DETR does not.
Solution
Wrap
Session::builder()in panic catching similar to the speaker module'scatch_panic_into_errorpattern.