Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in setCameraFocusMode method on few devices #13

Open
pks1988 opened this issue Aug 22, 2018 · 3 comments
Open

Exception in setCameraFocusMode method on few devices #13

pks1988 opened this issue Aug 22, 2018 · 3 comments

Comments

@pks1988
Copy link

pks1988 commented Aug 22, 2018

This crash log is reported to me by the Fabric:
Fatal Exception: java.lang.RuntimeException: setParameters failed
at android.hardware.Camera.native_setParameters(Camera.java)
at android.hardware.Camera.setParameters(Camera.java:1922)
at views.ScanActivity.setCameraFocusMode(Unknown Source)
at views.ScanActivity.setCameraPreviewDisplayAndStartPreview(Unknown Source)
at views.ScanActivity.startRecognition(Unknown Source)
at views.ScanActivity$3.surfaceChanged(Unknown Source)
at android.view.SurfaceView.updateWindow(SurfaceView.java:591)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:176)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1972)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1063)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5903)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5345)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:947)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:742)

So, kindly support me to resolve this issue.

@aleksey-ka
Copy link
Contributor

We have not seen this error while testing on our collection of test devices. So please give us the model and OS version of the devices where you encounter the problem.

The error itself doesn't seem to be inside our product. It is either an error in camera implementation on that particular device or due to improper use of the camera in our sampe/your application.
If the former is true then there is very little we can do - I would recommend that you catch the exception and fall back on some other focusing method on these devices. If the latter is true - then you should review the camera usage and find the error. If we knew the cause, we would be willing to advise. But unfortunately we are as ignorant as anyone on the issue and would appritiate advice from you

@pks1988
Copy link
Author

pks1988 commented Aug 23, 2018

Thanks for your response. I'am posting the device model and OS versions on which the crash reported:
itel it1508 : Version 5 (70% crash)
Version 4 (20% crash)
Version 6 (10% crash)

ALCATEL ONETOUCH PIXI 3 (3.5) : Version 5 (70% crash)
Version 4 (20% crash)
Version 6 (10% crash)

TECNO S1 : Version 5 (70% crash)
Version 4 (20% crash)
Version 6 (10% crash)

These are the details provided by the Fabric.
I will also try to investigate as per the suggestions provided by you.

@aleksey-ka
Copy link
Contributor

Thank you for the details!

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

No branches or pull requests

2 participants