Crash while navigating back to preview from captured image
See original GitHub issueGetting this error when running the sample.
Steps to reproduce.
- Capture the photo.
- Navigate to captured image on clicking Gallery icon.
- Navigate back to camera preview and notice the crash
I am able to reproduce consistently 👍
Device Name : Nokia 5.1 Model : TA-1061 Android version : 9
Process: com.android.example.cameraxbasic, PID: 31287
java.lang.IllegalStateException
at androidx.core.util.Preconditions.checkState(Preconditions.java:96)
at androidx.core.util.Preconditions.checkState(Preconditions.java:108)
at androidx.camera.camera2.internal.Camera2CameraImpl$StateCallback.onClosed(Camera2CameraImpl.java:1298)
at androidx.camera.camera2.internal.CameraDeviceStateCallbacks$ComboDeviceStateCallback.onClosed(CameraDeviceStateCallbacks.java:105)
at android.hardware.camera2.impl.CameraDeviceImpl$5.run(CameraDeviceImpl.java:207)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Preview crashes when i try to view images full screen???
When i want to view a photo in Preview in "full screen", like i should be able to, the whole app crashes, shuts...
Read more >android - App is crashing after capturing picture using intents
Solution: Save the file path of the Image and use it when onActivityResult is called. You can use onSavedInstanceState and onRestoreInstanceState methods to ......
Read more >Android app CRASH when capturing image using camera ...
Steps to Reproduce After successfully capturing an image using camera, when i click OK, the app crashes saying 'Unfortunately ** Stopped'.
Read more >[Camera Plugin] Application crashes and restarts when taking ...
When capturing an image with the Camera plugin it crashes everytime I take a picture and the app restarts. This only happens on...
Read more >How to Solve Windows 10 Photos App Crashes Effectively[2021]
Click 'Windows' + 'E' keys to launch 'Windows Explorer. · Seeing the 'Libraries' folder, you got to choose this. · The right window...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was getting this error also, and on screen rotation too. I did as @waliahimanshu suggested and upgraded to -alpha09 and the issue is gone
Hi, just took the latest changes since yesterday, and got the crash using repro steps above but different stack trace (see below).
However, yesterday I updated the version of sample project to alpha09, and the crash did not happen. I also found this note in release notes of alpha 09
So I reckon, the sample needs updating, because as is it crashes constantly.