App crashes on Android after capturing high-resolution (50MP) image using camera
Description
The app crashes on Android physical devices after capturing an image and tapping the OK / Confirm button in the camera screen. The API response is not received because the app crashes immediately after the image is captured.
This issue does not occur on the Android emulator — the same flow works correctly there.
The crash happens only on some physical devices, mainly those with very high-resolution cameras (~50MP).
Steps to Reproduce
Open the app on a physical Android device (high-resolution camera).
Navigate to the screen that opens the camera.
Capture an image using the default camera settings (~50MP).
Tap OK / Confirm.
App crashes before receiving the API response.
Expected Behavior
The captured image should be handled safely.
The image should be compressed or downscaled.
The API request should complete successfully.
The app should not crash.
Actual Behavior
App crashes immediately after confirming the captured image.
API response is never received.
Issue occurs only on some physical devices, not on emulator.
Additional Information
React Native version: 0.68.0
Image Picker library: react-native-image-crop-picker (latest version)
Platform: Android (physical devices only)
Affected devices: Some Android devices with high-resolution cameras (≈50MP, e.g. Samsung)
Development OS: macOS (MacBook)
Dev tools: Android Studio (Android SDK)
Suspected Cause
The crash appears to be caused by memory pressure / OOM (Out Of Memory) when handling very large images on physical devices.
The emulator does not reproduce the issue due to:
Lower image resolution
Different memory handling
Simulated camera behavior
Workarounds Tried
Works fine on emulator
Works fine on devices with lower camera resolution
Crash consistently occurs with high-resolution images (~50MP)
Source: react-native-image-picker/react-native-image-picker