code-scanner icon indicating copy to clipboard operation
code-scanner copied to clipboard

[ Freeze ] Freeze on Xiaomi Mi 9

Open tperraut opened this issue 6 years ago • 8 comments

I get some freeze only on Xiaomi Mi 9 devices, here is the stacktrace

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x75d8b3c8 self=0x71f3869c00
  | sysTid=11349 nice=-10 cgrp=default sched=0/0 handle=0x72798e9ed0
  | state=S schedstat=( 7281512480 2506285533 14450 ) utm=540 stm=187 core=5 HZ=100
  | stack=0x7ffdf09000-0x7ffdf0b000 stackSize=8192KB
  | held mutexes=
  #00  pc 00000000000c14a4  /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
  #01  pc 000000000007bb2c  /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+132)
  #02  pc 0000000000058d14  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+244)
  #03  pc 0000000000059c00  /system/lib64/libbinder.so (android::IPCThreadState::waitForResponse(android::Parcel*, int*)+60)
  #04  pc 00000000000599a4  /system/lib64/libbinder.so (android::IPCThreadState::transact(int, unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+180)
  #05  pc 000000000004df60  /system/lib64/libbinder.so (android::BpBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+72)
  #06  pc 000000000005a18c  /system/lib64/libcamera_client.so (android::hardware::BpCamera::stopPreview()+228)
  #07  pc 000000000004cb1c  /system/lib64/libcamera_client.so (android::Camera::stopPreview()+168)
  #08  pc 0000000000192fc0  /system/lib64/libandroid_runtime.so (android_hardware_Camera_stopPreview(_JNIEnv*, _jobject*)+48)
  at android.hardware.Camera._stopPreview (Camera.java)
  at android.hardware.Camera.stopPreview (Camera.java:920)
  at com.budiyev.android.codescanner.CodeScanner.access$1600 (CodeScanner.java)
  at com.budiyev.android.codescanner.CodeScanner.access$3402 (CodeScanner.java)
  at com.budiyev.android.codescanner.CodeScanner.releaseResources (CodeScanner.java)
  at com.budiyev.android.codescanner.CodeScanner.stopPreviewInternal (CodeScanner.java)
  at com.budiyev.android.codescanner.CodeScanner.access$2400 (CodeScanner.java)
  at com.budiyev.android.codescanner.CodeScanner.stopPreviewInternalSafe (CodeScanner.java)
  at com.budiyev.android.codescanner.CodeScanner.access$2000 (CodeScanner.java)
  at com.budiyev.android.codescanner.CodeScanner.releaseResourcesInternal (CodeScanner.java)
  at com.budiyev.android.codescanner.CodeScanner$SurfaceCallback.surfaceDestroyed (CodeScanner.java)
  at android.view.SurfaceView.updateSurface (SurfaceView.java:740)
  at android.view.SurfaceView.onWindowVisibilityChanged (SurfaceView.java:280)
  at android.view.View.dispatchWindowVisibilityChanged (View.java:13829)
  at android.view.ViewGroup.dispatchWindowVisibilityChanged (ViewGroup.java:1599)
  at android.view.ViewGroup.dispatchWindowVisibilityChanged (ViewGroup.java:1599)
  at android.view.ViewGroup.dispatchWindowVisibilityChanged (ViewGroup.java:1599)
  at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2105)
  at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1782)
  at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7785)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1031)
  at android.view.Choreographer.doCallbacks (Choreographer.java:854)
  at android.view.Choreographer.doFrame (Choreographer.java:789)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1016)
  at android.os.Handler.handleCallback (Handler.java:883)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at android.os.Looper.loop (Looper.java:221)
  at android.app.ActivityThread.main (ActivityThread.java:7520)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:539)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:950)

tperraut avatar Nov 20 '19 11:11 tperraut

I have the same issue. My device is Xioami Mi 9T aka Redmi K20 pro.

dhirajuchil007 avatar Nov 24 '19 10:11 dhirajuchil007

I have the same issue in my Xioami Mi 9 sometimes. But when open and wait to about 40 sec. the camera back to work.

chaiat avatar Dec 26 '19 05:12 chaiat

We got some users reporting the same issue. @yuriy-budiyev Any idea on why this is happening in Xiaomi devices ?

christophewang avatar Jan 03 '20 11:01 christophewang

I have an Android 10 device with the same problems thought it dosnt seem like a library problem but a problem with the manufacturer ability to support legacy android.hardware.Camera. Something that seems on the way out as api 21 has almost banished (last year it was already on single digits).

As @chaiat pointed sometimes it works if you wait. Other times it fails and provokes a main failure where further camera access is imposible (camera service down and needing to reset phone)

Anyway anything I tested that uses android.hardware.Camera2 like CameraX works perfectly.

Hope @yuriy-budiyev migrates soon. Awesome library.

BluestormDNA avatar Jan 19 '20 14:01 BluestormDNA

up, i have the same problem

openmotion avatar Feb 26 '20 15:02 openmotion

Unfortunately, same issue here with Xiaomi Mi9. I am really interested in integrating this library to my own app. Would be great to know if @yuriy-budiyev are up trying to fix this issue?

hubercode avatar Mar 18 '20 18:03 hubercode

Happened to me also Xiaomi Redmi Note 9 Pro.

Yurdaaaaa avatar Jun 21 '22 15:06 Yurdaaaaa

hi is there any updates?

fzyzcjy avatar Nov 02 '22 02:11 fzyzcjy