Skip to content

fix: ORT panics on initialization cause daily crashes #3317

@louis030195

Description

@louis030195

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions