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

java.lang.RuntimeException: CameraSource.updateRotation getParameters failed (empty parameters) #43

Open
valeriobottone-milkman opened this issue Oct 18, 2019 · 0 comments

Comments

@valeriobottone-milkman
Copy link

I have an app that uses barcode reading, but sometimes especially with Huawei devices, I find this crash.

Fatal Exception: java.lang.RuntimeException: getParameters failed (empty parameters)
at android.hardware.Camera.native_getParameters(Camera.java)
at android.hardware.Camera.getParameters(Camera.java:3078)
at online.devliving.mobilevisionpipeline.camera.CameraSource.updateRotation(CameraSource.java:1012)
at online.devliving.mobilevisionpipeline.camera.CameraSourcePreview.onConfigurationChanged(CameraSourcePreview.java:153)
at android.view.View.dispatchConfigurationChanged(View.java:10553)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1336)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1340)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1340)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1340)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1340)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1340)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1340)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1340)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1340)
at android.view.ViewGroup.dispatchConfigurationChanged(ViewGroup.java:1340)
at android.view.ViewRootImpl.updateConfiguration(ViewRootImpl.java:3752)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3909)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6255)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)

I've probably figured out where it comes from, but I don't know how to solve it.
I insert the part of the code that should make this problem arise.

builder = builder.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);

I believe that some devices don't notify the event "onFocusChanged" and this could bring the crash for the continued search of focus about the CameraSource.
Could someone help me solve the issue?

@valeriobottone-milkman valeriobottone-milkman changed the title CameraSource.updateRotation getPArameters failed (empty parameters) CameraSource.updateRotation getParameters failed (empty parameters) Oct 18, 2019
@valeriobottone-milkman valeriobottone-milkman changed the title CameraSource.updateRotation getParameters failed (empty parameters) java.lang.RuntimeException: CameraSource.updateRotation getParameters failed (empty parameters) Oct 18, 2019
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

1 participant