Skip to content

[Crashlytics] android.os.Parcel.createExceptionOrNull #200

Open

Description

@stozo04

Automated triage — a new fatal crash was reported by Firebase Crashlytics.


@claude please triage this crash. Use the Firebase MCP Crashlytics tools to fetch the
stacktrace and sample events for issue bedd0f72eaaa76638e502eb0a04a034a, consult docs/lessons_learned/,
and post a root-cause comment. If you can point to a specific cause in the code, open a
draft PR with a minimal fix per docs/DEFINITION_OF_DONE.md (note CI could not run
the emulator). Otherwise label needs-human and explain. Never auto-merge.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. claude commented on Oct 21, 2026

    @claude

    Root-cause analysis

    Note: crashlytics_list_events returned empty — no raw stack frames are available from the MCP API for this issue. Analysis below is based on the issue metadata, crash subtitle, and source-code inspection.


    What the error means

    android.os.Parcel.createExceptionOrNull is the frame where an IPC call returns an exception from the camera server (Camera2/HAL). The subtitle —

    android.os.ServiceSpecificException - checkPidStatus:2278: Attempt to use camera from a different process than original client

    — comes from CameraService::checkPidStatus() in the Android camera server. It fires when the process PID that is calling a camera device method does not match the PID that opened the camera device. This is a camera-server-side rejection, not an app-level exception.


    What was ruled out

    Check Result
    Multi-process configuration None. No android:process attribute on any component in AndroidManifest.xml. App is single-process.
    BoomerangRenderWorker camera access None. Worker only encodes already-captured footage via Media3 Transformer.
    Single CameraScreen call site (Lesson 012) Clean. ReadyToCapture + Recording share one CameraScreenHost branch in OpenLoopNavHost.
    Mid-recording unbind guard (Lesson 022) Present. releaseCamera() returns early when activeRecording != null.
    Camera effect always-attached pattern (Lesson 031) Correct. LensCameraEffect is attached on every bind, never conditional.
    unbindAll() before rebind in startCamera() Present. cameraProvider?.unbindAll() called at CameraManager.kt:151 on every re-entry.
    DisposableEffect tears down camera on dispose (Lesson 022) Present. CameraScreen.kt:247-251 calls releaseCamera() on dispose.

    Most likely cause (low confidence — no stack trace)

    This crash pattern — a camera service PID check rejecting the calling process — is well-known on Samsung and certain Xiaomi/OPPO devices with custom camera HAL implementations. It typically surfaces when:

    1. The app process is killed (OOM, user swipe, Android reclaim) while a BoomerangRenderWorker FGS is running.
    2. WorkManager restarts the SystemForegroundService in a new process (new PID).
    3. The user re-enters the app in the same new-PID process.
    4. CameraManager.startCamera() tries to open the camera, but the OEM HAL's internal PID registry has not fully flushed the stale connection from the old (dead) process.

    On AOSP, the camera server cleans up stale client connections automatically when a process dies. On some OEM HALs (Samsung in particular), checkPidStatus is stricter and the cleanup has a race window — resulting in exactly this transient error.

    Because the MCP events API returned no stack frames, it is not possible to confirm the exact call site, device model, or Android version where this is triggering.


    Files involved

    • app/src/main/java/io/github/stozo04/openloop/camera/CameraManager.kt — camera lifecycle, startCamera / releaseCamera / shutdown
    • app/src/main/java/io/github/stozo04/openloop/ui/CameraScreen.kt:243-251 — LaunchedEffect / DisposableEffect pair
    • app/src/main/java/io/github/stozo04/openloop/MainActivity.kt:236, 578 — CameraManager creation and shutdown() call

    Decision: needs-human

    Confidence in a specific code fix is LOW:

    • The app's camera lifecycle code is correct and follows all established lessons.
    • The error is OEM/HAL-level and device-specific, not reproducible on the emulator.
    • Without a stack trace, we cannot confirm the exact call site or device.

    Suggested next step: in the Firebase console (SIGNAL_FRESH — still accumulating events), check the device model and Android version on the crash events. If Samsung devices dominate, a targeted catch (ServiceSpecificException) around bindToLifecycle with a ProcessCameraProvider.getInstance retry on a fresh coroutine tick could be the minimal mitigation — but that needs human judgment and hardware verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcrashlytics-autoneeds-human

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions