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

ANR at DecoderWrapper.java line 107 #161

Open
Zookey opened this issue May 17, 2022 · 3 comments
Open

ANR at DecoderWrapper.java line 107 #161

Zookey opened this issue May 17, 2022 · 3 comments

Comments

@Zookey
Copy link

Zookey commented May 17, 2022

Hi,

I am using the library and it works great, but I see some ANR reports in Firebase Crashlytics.

One of the is at DecoderWrapper.java line 107.

This is full log that I have:

main (native): tid=1 systid=3145 
#00 pc 0xa1fb8 libc.so 
#01 pc 0x5b988 libc.so 
#02 pc 0x46070 libbinder.so 
#03 pc 0x472ac libbinder.so 
#04 pc 0x46ff0 libbinder.so 
#05 pc 0x3eafc libbinder.so 
#06 pc 0x67ce4 libcamera_client.so 
#07 pc 0x5886c libcamera_client.so 
#08 pc 0x198628 libandroid_runtime.so 
       at android.hardware.Camera._stopPreview(Native method)
       at android.hardware.Camera.stopPreview(Camera.java:775)
       at com.budiyev.android.codescanner.CodeScanner.stopPreviewInternal(CodeScanner.java:600)
       at com.budiyev.android.codescanner.CodeScanner.stopPreviewInternalSafe(CodeScanner.java:612)
       at com.budiyev.android.codescanner.CodeScanner.access$2000(CodeScanner.java:54)
       at com.budiyev.android.codescanner.CodeScanner$SurfaceCallback.surfaceDestroyed(CodeScanner.java:777)
       at android.view.SurfaceView.notifySurfaceDestroyed(SurfaceView.java:2186)
       at android.view.SurfaceView.updateSurface(SurfaceView.java:1318)
       at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:419)
       at android.view.View.dispatchWindowVisibilityChanged(View.java:15475)
       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1637)
       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1637)
       at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:1637)
       at com.android.internal.policy.DecorView.dispatchWindowVisibilityChanged(DecorView.java:4745)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3459)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2893)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10445)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1108)
       at android.view.Choreographer.doCallbacks(Choreographer.java:866)
       at android.view.Choreographer.doFrame(Choreographer.java:797)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8663)
       at java.lang.reflect.Method.invoke(Native method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Is it possible to fix this?

@yuriy-budiyev
Copy link
Owner

It's in camera:
at android.hardware.Camera._stopPreview(Native method)
at android.hardware.Camera.stopPreview(Camera.java:775)

@yuriy-budiyev
Copy link
Owner

yuriy-budiyev commented May 19, 2022

DecoderWrapper works at background thread, ANR isn't possible there.

@Zookey
Copy link
Author

Zookey commented May 28, 2022

@yuriy-budiyev So, it seems that is the issue in Android Camera, right?

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