Skip to content

Conversation

EthanDM
Copy link

@EthanDM EthanDM commented Oct 18, 2025

What

Fix the navigation freeze on React Navigation/Fabric by shutting the camera session down deterministically when the view unmounts.

Changes

  • Add CameraSession.shutdown, which disables photo/video/audio/code-scanner/location/torch before flipping isActive = false, and clears delegates while removing outputs.
  • Stop both capture sessions asynchronously during CameraSession.deinit as a backstop.
  • Have CameraView call the shutdown helper on unmount/deinit, log if teardown exceeds 2 s, and guard against concurrent shutdowns.

Tested on

  • iPhone 14 Pro (iOS 26.0.1) with code scanner enabled, navigating away from the camera screen (no freeze).

Related issues

- Add shutdown method to stop all outputs and release resources
- Schedule shutdown with warning if it takes longer than expected
@vercel
Copy link

vercel bot commented Oct 18, 2025

@EthanDM is attempting to deploy a commit to the mrousavy's Team Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Navigating away on React Native 0.78+, XCode 26, and React Native Vision Camera v4.7.1 freezes the app

1 participant