cameraview icon indicating copy to clipboard operation
cameraview copied to clipboard

takePicture failed while taking picture on the move(Moto G3)

Open andreilisun opened this issue 8 years ago • 4 comments

FATAL EXCEPTION: main Process: com.masterofcode.llc.phoxapp.debug, PID: 7007 java.lang.RuntimeException: takePicture failed at android.hardware.Camera.native_takePicture(Native Method) at android.hardware.Camera.takePicture(Camera.java:1461) at com.google.android.cameraview.Camera1.takePictureInternal(Camera1.java:230) at com.google.android.cameraview.Camera1$2.onAutoFocus(Camera1.java:221) at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1146) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

andreilisun avatar Feb 02 '17 20:02 andreilisun

I'm seeing the same issue in crash reports. Reported devices are (among others) Sony C2304 (Android 4.2.2), Huawei KII-L21 (Android 6.0.1), and Oppo A33w (Android 5.1).

This is the full stacktrace:

Fatal Exception: java.lang.RuntimeException: takePicture failed
       at android.hardware.Camera.native_takePicture(Camera.java)
       at android.hardware.Camera.takePicture(Camera.java:1647)
       at com.google.android.cameraview.Camera1.takePictureInternal(Camera1.java:230)
       at com.google.android.cameraview.Camera1$2.onAutoFocus(Camera1.java:221)
       at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1216)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:150)
       at android.app.ActivityThread.main(ActivityThread.java:5546)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)

Some of the crashes include this: Fatal Exception: java.lang.RuntimeException: takePicture failed, error=-38

kevinpelgrims avatar Feb 08 '17 11:02 kevinpelgrims

@jydimir can you reproduce this consistently? If so, can you explain how.

kevinpelgrims avatar Feb 08 '17 12:02 kevinpelgrims

@kevinpelgrims It was reproduceable. When I took picture while I was moving camera quickly I got that exception. I'm going to make proper fix soon.

andreilisun avatar Feb 11 '17 10:02 andreilisun

error code -38 resembles to a constant ENOSYS in OsSystem class present in android.system package. ENOSYS is thrown when some of the camera methods are not implemented.

DebdeepG avatar Dec 20 '17 12:12 DebdeepG