saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
2.99k stars 1.2k forks source link

Unplug usb camera while it is still in use and application end up with ANR. #472

Closed chenxi1991 closed 3 years ago

chenxi1991 commented 5 years ago

Input dispatching timed out

ANR Input dispatching timed out (Waiting because the touched window's input channel is full. Outbound queue length: 1. Wait queue length: 32.)

1 java.lang.Object.wait!(Native method)

2 com.serenegiant.usbcameracommon.AbstractUVCCameraHandler.void stopPreview()(AbstractUVCCameraHandler.java:208)

3 com.serenegiant.usbcameracommon.AbstractUVCCameraHandler.void close()(AbstractUVCCameraHandler.java:175)

xiedong2002 commented 5 years ago

Unluckily , The issue occurs on me . It can easily be reproduced on Android 7.1 with Rockchip 3288. I am trying to debug the issue. It might be caused by the fact that a lock is not fired since some of outstanding transfer requests are not handled properly ( cancelled or completed). Continue ......

mingtong commented 5 years ago

You should handle the event when unplug camera and do release things.

leifeng1991 commented 3 years ago

@chenxi1991 Solution to the do