IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.43k stars 4.8k forks source link

on Android USB 3.2, the example `capture` constantly report "bulk_transfer returned error, error: Out of memory" #4091

Closed Mad-Thanos closed 4 years ago

Mad-Thanos commented 5 years ago
Required Info
Camera Model D415
Firmware Version 5.11.04
Operating System & Version MacOS 10.13.6+Android Studio 3.4.1
Kernel Version (Linux Only) N/A
Platform Andriod 8.1(linux kernel 4.5) +USB 3.1 Gen2 c-to-c cable
SDK Version 2.22.0
Language java &c++ }
Segment Smartphone

Issue Description

short version:

I ran the wrappers/android/examples/capture app on a Android Phone(has a usb 3.1 compatible type-c female interface) with D415 plugged in. But there was only black screen on the UI, which means the text "Connect to a Realsense Camera" was gone but no video data rendered. And at the same time, I found in the logcat of Android studio there reported constantly a plenty of warning messages:

2019-05-29 00:01:49.276 27981-28475/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory

the full log was something as follow:

Click me to expand ``` 2019-05-29 00:01:45.036 27981-28098/com.intel.realsense.capture D/librs DeviceWatcher: Device: /dev/bus/usb/003/002 added successfully 2019-05-29 00:01:49.237 27981-27981/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-05-29 00:01:49.237 27981-27981/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-05-29 00:01:49.239 27981-27981/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-05-29 00:01:49.239 27981-27981/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-05-29 00:01:49.241 27981-27981/com.intel.realsense.capture D/librs capture example: try start streaming 2019-05-29 00:01:49.241 27981-27981/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-05-29 00:01:49.241 27981-27981/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-05-29 00:01:49.276 27981-28475/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory ...... many many repeated warning message as the above line..... ```

My Question is: Has anybody ever seen this problem before? What should I do to fix this?

Longer version:

My setup:

"Android Phone Huawei P20 + USB 3.1 Gen 2 C Male to C Male cable + Realsense D415". I've smiply checked the cable, it is compliant with USB 3.1 Gen 2 10/20Gbps 5A 100W. I've also checked the Huawei P20's type c interface by plugging it into my Macbook and checking the 'USB 3.0 Bus' section of System Report of the MacBook. It showed the Speed is up to 5Gbps of "Huawei P20+ the c-to-c cable" combination. I guess that means either Huawei P20 or my Macbook has a USB 3.1 Gen 1 or USB 3.0 interface.

What I did and what I saw:

I downloaded the librealsense-2.22.0.aar and librealsense-2.22.0.zip from dl.bintray.com. After that, I import them into the android project of wrappers/android, making both examples/native-example and examples/capture Modules to depend on them.

Then I modified the examples/native-example's source code to enumerate the device, the sensors and the stream profiles of each sensor. And save the enumerated result to a log file: usb3.2-P20-enumerate-log.txt In a word, I could tell that the highest profiles (1280x720xZ16x30Hz Depth stream and the 1920x1080xRGB8x30Hz Color stream) are available.

In the next step, I build and ran examples/capture on the Huawei P20. After granting the USB permission the capture app, the screen was black and the message “27981-28475/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory” was flooding the Logcat.

matkatz commented 5 years ago

Hi @GucciPrada That seems to be the same issue that was reported in #3612. I'm still not able to reproduce it on my RK3399 setup and I plan to try some other devices. Did you see this issue on earlier versions of librealsense?

Mad-Thanos commented 5 years ago

Hi,@matkatz thanks for your reply. I just read that similar issue you mentioned. I didn't try earlier version of librealsense or firmware. I'll try it out today. And I'm also keep finding other android devices that support usb3.1/3.2 to try. I'll post any news I get at here.

For additional information, 1.I've tried some android phones that only support usb 2.1(e.g. Oppo Find X/Vivo Nex), the 'capture' example are working nicely, successfully and stably delivering RGBD stream of VGA(640x480)@30Hz. That's quite a nice work from you guys! However I wanna a higher resolution RGBD stream(.i.e 720p or 1080p). Have you or other people successfully made the D415+android deliver 720P or 1080P RGBD stream @30fps? which android device do they use? and the cable?

matkatz commented 5 years ago

I tried to reproduce this issue on Pixel 2 (Android 9), Samsung S8 (Android 9) and FireFly RK3399 (Android 8.1) with no success. I will try to get other platforms next week and hopefully reproduce the issue. As for the high resolution streaming, all of the platforms above were capable to stream 720p depth with 1080p color but with significant frame drops, I get about 20 FPS for the depth stream and 15 FPS for the color.

Mad-Thanos commented 5 years ago

I tried to reproduce this issue on Pixel 2 (Android 9), Samsung S8 (Android 9) and FireFly RK3399 (Android 8.1) with no success. I will try to get other platforms next week and hopefully reproduce the issue. As for the high resolution streaming, all of the platforms above were capable to stream 720p depth with 1080p color but with significant frame drops, I get about 20 FPS for the depth stream and 15 FPS for the color.

Thank you! That is quite informative. What about the USB 3.0 cable or adapter you used? any advice or recommendation?

matkatz commented 5 years ago

I'm not sure what type my cable is it but you can probably test your cable with realsense-viewer over Windows/Linux

Mad-Thanos commented 5 years ago

OK, Thank you! I tested my cable with realsense-viewer on Macbook. I'll test it on Windows later.

Mad-Thanos commented 5 years ago

I tried with my new Android Phone, Honor V20 (another brand of Huawei), the device was enumerated as usb2.1 device but actually the Phone is declared to support USB 3.1 Gen1. And this time, the same 'out-of-memory' problem happened with firmware 5.11.4 & librealsense 2.22.0 or 2.21.0. Here is the log while running firmware 5.11.4+librealsense 2.21.0:

Click me to expand ``` 2019-06-04 14:14:57.981 28713-28713/com.intel.realsense.capture I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED 2019-06-04 14:14:58.140 28713-28713/com.intel.realsense.capture I/librs UsbUtilities: grantUsbPermissions: device: UsbDevice[mName=/dev/bus/usb/002/002,mVendorId=32902,mProductId=2771,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 415 ,mProductName=Intel(R) RealSense(TM) Depth Camera 415 ,mVersion=50.114,mSerialNumber=null,mSubProductId =-1,mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]] UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[] UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]] 2019-06-04 14:15:18.593 28713-28713/com.intel.realsense.capture W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@e6c6c4e 2019-06-04 14:15:18.621 28713-28713/com.intel.realsense.capture I/librs Enumerator: onReceive: USB_CONTROL_PERMISSION 2019-06-04 14:15:18.623 28713-28752/com.intel.realsense.capture I/librs MessagesHandler: handleMessage: realsense device attached 2019-06-04 14:15:18.623 28713-28752/com.intel.realsense.capture I/librs Enumerator: notifyOnAttach 2019-06-04 14:15:18.624 28713-28752/com.intel.realsense.capture I/usbhost: usb_device_new /dev/bus/usb/002/002 fd: 64 2019-06-04 14:15:18.624 28713-28752/com.intel.realsense.capture I/usbhost: usb_device_new read returned 1230 errno 19 2019-06-04 14:15:18.645 28713-28752/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- @ path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:15:18.645 28713-28752/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- @ path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:15:18.672 28713-28713/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- @ path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:15:18.672 28713-28713/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- @ path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:15:18.677 28713-28713/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- @ path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:15:18.677 28713-28713/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- @ path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:15:18.679 28713-28713/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- @ path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:15:18.679 28713-28713/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- @ path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:15:18.752 28713-28921/com.intel.realsense.capture W/librs: bulk_transfer on read endpoint returned error, ERROR: Out of memory 2019-06-04 14:15:19.013 28713-28921/com.intel.realsense.capture W/librs: bulk_transfer on read endpoint returned error, ERROR: Out of memory ```

And I then tried to use firmware 5.11.4 + librealsense 2.19.2, it can work correctly, delivering 640x480 RGBD@30Hz, although the device was enumverated as usb 2.1 device. Here is the log:

Click me to expand ``` 2019-06-04 14:00:24.198 27346-27346/com.intel.realsense.capture I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED 2019-06-04 14:00:24.278 27346-27346/com.intel.realsense.capture I/librs UsbUtilities: grantUsbPermissions: device: UsbDevice[mName=/dev/bus/usb/002/002,mVendorId=32902,mProductId=2771,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 415 ,mProductName=Intel(R) RealSense(TM) Depth Camera 415 ,mVersion=50.114,mSerialNumber=null,mSubProductId =-1,mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]] UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[] UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]] 2019-06-04 14:00:34.898 27346-27346/com.intel.realsense.capture I/librs Enumerator: onReceive: USB_CONTROL_PERMISSION 2019-06-04 14:00:34.901 27346-27370/com.intel.realsense.capture I/librs MessagesHandler: handleMessage: realsense device attached 2019-06-04 14:00:34.901 27346-27370/com.intel.realsense.capture I/librs Enumerator: notifyOnAttach 2019-06-04 14:00:34.902 27346-27370/com.intel.realsense.capture I/usbhost: usb_device_new /dev/bus/usb/002/002 fd: 80 2019-06-04 14:00:34.902 27346-27370/com.intel.realsense.capture I/usbhost: usb_device_new read returned 1230 errno 0 2019-06-04 14:00:34.920 27346-27370/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- P path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:00:34.920 27346-27370/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- P path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:00:37.802 27346-27346/com.intel.realsense.capture W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@73c1f23 2019-06-04 14:00:37.873 27346-27346/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- P path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:00:37.873 27346-27346/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- P path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:00:37.874 27346-27346/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- P path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:00:37.874 27346-27346/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- P path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:00:37.875 27346-27346/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- P path- /dev/bus/usb/002/002 susb specification- 210 2019-06-04 14:00:37.875 27346-27346/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- P path- /dev/bus/usb/002/002 susb specification- 210 ```
dreifelix commented 5 years ago

Encountered this issue as well, using D435 + Pixel3 and D435 + Samsung S7 (same results). Both devices are not rooted, and are detected as usb 210. Firmware 5.11.04, librealsense 2.22. Tried both camera and capture apps.

For camera app, it starts with black screen, then the Settings page is displayed after a few seconds. I tried selecting different settings, including the lowest frame rate and resolution and only one active stream, but I still get the Out of memory issue.

Next, I tried building the AAR and created my own app. Same result for both devices. Let me know if you want me to try something else.

See sample log below, if it helps:

capture app logs for D435 + S7 ``` 06/06 21:53:29: Launching capture $ adb shell am start -n "com.intel.realsense.capture/com.intel.realsense.capture.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Waiting for process to come online Connected to process 20619 on device samsung-sm_g930f-192.168.43.1:5555 Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. I/zygote64: no shared libraies, dex_files: 1 I/InstantRun: starting instant run server: is main process D/librs UsbUtilities: hasUsbPermission D/librs UsbUtilities: grantUsbPermissions I/librs UsbUtilities: grantUsbPermissions: device: UsbDevice[mName=/dev/bus/usb/001/002,mVendorId=32902,mProductId=2823,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 435 ,mProductName=Intel(R) RealSense(TM) Depth Camera 435 ,mVersion=2.16,mSerialNumber=null,mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 with RGB Module Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]] UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 with RGB Module Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 with RGB Module RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[] UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 with RGB Module RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]] D/librs: Librealsense VERSION: 2.22.0 D/OpenGLRenderer: HWUI GL Pipeline D/ViewRootImpl@a2905e4[MainActivity]: setView = DecorView@59b2a4d[MainActivity] TM=true MM=false D/ViewRootImpl@a2905e4[MainActivity]: dispatchAttachedToWindow V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0 D/ViewRootImpl@a2905e4[MainActivity]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 529795960832} changed=true I/OpenGLRenderer: Initialized EGL, version 1.4 D/OpenGLRenderer: Swap behavior 2 D/libGLESv1: STS_GLApi : DTS, ODTC are not allowed for Package : com.intel.realsense.capture D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1 D/OpenGLRenderer: eglCreateWindowSurface = 0x7b5a4f64a0 D/SurfaceView: BG show() Surface(name=Background for - SurfaceView - com.intel.realsense.capture/com.intel.realsense.capture.MainActivity@e82a902@0) com.intel.realsense.librealsense.GLRsSurfaceView{e82a902 V.E...... ......ID 0,0-1080,1920 #7f070037 app:id/glSurfaceView} V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0 D/SurfaceView: surfaceCreated 1 com.intel.realsense.librealsense.GLRsSurfaceView{e82a902 V.E...... ......ID 0,0-1080,1920 #7f070037 app:id/glSurfaceView} D/SurfaceView: surfaceChanged (1080,1920) 1 com.intel.realsense.librealsense.GLRsSurfaceView{e82a902 V.E...... ......ID 0,0-1080,1920 #7f070037 app:id/glSurfaceView} D/ViewRootImpl@a2905e4[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 63 - 0, 0) vi=Rect(0, 63 - 0, 0) or=1 D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:2 D/ViewRootImpl@a2905e4[MainActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 529795960832} changed=false D/ViewRootImpl@a2905e4[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@6acc213 nm : com.intel.realsense.capture ic=null I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus D/librs: Librealsense VERSION: 2.22.0 Librealsense VERSION: 2.22.0 V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@8629c50 nm : com.intel.realsense.capture ic=null D/ViewRootImpl@a2905e4[MainActivity]: MSG_RESIZED: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 63 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1 I/librs Enumerator: onReceive: USB_CONTROL_PERMISSION D/librs UsbUtilities: hasUsbPermission D/librs UsbUtilities: hasUsbPermission I/librs MessagesHandler: handleMessage: realsense device attached I/librs Enumerator: notifyOnAttach D/librs DeviceWatcher: Adding device: /dev/bus/usb/001/002 D/librs: AddUsbDevice, previous device count: 0 AddUsbDevice, adding device: /dev/bus/usb/001/002, descriptor: 100 AddUsbDevice, create D/librs: AddUsbDevice, notify I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: AddUsbDevice, current device count: 1 D/librs DeviceWatcher: Device: /dev/bus/usb/001/002 added successfully I/librs MessagesHandler: handleMessage: realsense device detached I/librs Enumerator: notifyOnDetach D/librs DeviceWatcher: Removing device: /dev/bus/usb/001/002 D/librs: RemoveUsbDevice, previous device count: 1 E/librs: Cancel request failed: No such device D/librs: usb device: /dev/bus/usb/001/002, released RemoveUsbDevice, removing device: /dev/bus/usb/001/002, descriptor: 100 RemoveUsbDevice, current device count: 0 D/UsbDeviceConnectionJNI: close D/librs DeviceWatcher: Device: /dev/bus/usb/001/002 removed successfully I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED D/librs UsbUtilities: hasUsbPermission D/librs UsbUtilities: grantUsbPermissions I/librs UsbUtilities: grantUsbPermissions: device: UsbDevice[mName=/dev/bus/usb/001/002,mVendorId=32902,mProductId=2823,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 435 ,mProductName=Intel(R) RealSense(TM) Depth Camera 435 ,mVersion=2.16,mSerialNumber=null,mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 with RGB Module Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]] UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 with RGB Module Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 with RGB Module RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[] UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 435 with RGB Module RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]] D/ViewRootImpl@a2905e4[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 D/ViewRootImpl@a2905e4[MainActivity]: MSG_RESIZED: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 63 - 0, 0) vi=Rect(0, 63 - 0, 0) or=1 D/ViewRootImpl@a2905e4[MainActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=true 529795960832} changed=false I/zygote64: Do partial code cache collection, code=29KB, data=26KB I/zygote64: After code cache collection, code=24KB, data=22KB Increasing code cache capacity to 128KB I/librs Enumerator: onReceive: USB_CONTROL_PERMISSION D/librs UsbUtilities: hasUsbPermission D/librs UsbUtilities: hasUsbPermission I/librs MessagesHandler: handleMessage: realsense device attached I/librs Enumerator: notifyOnAttach D/librs DeviceWatcher: Adding device: /dev/bus/usb/001/002 D/librs: AddUsbDevice, previous device count: 0 AddUsbDevice, adding device: /dev/bus/usb/001/002, descriptor: 100 AddUsbDevice, create D/librs: AddUsbDevice, notify I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: AddUsbDevice, current device count: 1 D/librs DeviceWatcher: Device: /dev/bus/usb/001/002 added successfully D/librs: interrupt_request: 1, 3, 0, 7, 0, 0, D/librs: interrupt_request: 1, 3, 0, 7, 0, 0, D/ViewRootImpl@a2905e4[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@9a54d81 nm : com.intel.realsense.capture ic=null I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus D/librs: Librealsense VERSION: 2.22.0 Librealsense VERSION: 2.22.0 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. D/librs capture example: try start streaming I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. D/librs: CLinearCoefficients started start new time_diff_keeper Creating UVC Device from path: /dev/bus/usb/001/002 global_timestamp_reader created D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 global_timestamp_reader created D/librs: global_timestamp_reader created D/librs: USB pipe 130 reset successfully D/librs: USB pipe 132 reset successfully D/librs capture example: streaming started successfully D/librs: Transfer thread started for endpoint address: 132 D/librs: Transfer thread started for endpoint address: 130 W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory D/librs: time_diff_keeper::update_diff_time - in time_diff_keeper::update_diff_time - lock W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory D/librs: time_diff_keeper::call reset() W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory D/librs: CLinearCoefficients::reset W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory D/librs: CLinearCoefficients::add_value - in CLinearCoefficients::add_value - lock W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory D/librs: CLinearCoefficients::calc_linear_coefs - in CLinearCoefficients::calc_linear_coefs - lock W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory D/librs: CLinearCoefficients::calc_linear_coefs - unlock CLinearCoefficients::add_value - unlock time_diff_keeper::update_diff_time - unlock W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory W/librs: bulk_transfer returned error, endpoint: �, error: Out of memory ```
matkatz commented 5 years ago

Thanks for the inputs! I'm trying to put my finger on the changes that cause this issue. I understand that it does not exists on 2.19.2 and it does on 2.21.0 What about 2.20.0 (uploaded to Bintray today)?

matkatz commented 5 years ago

There is a change on USB transfer method on v2.21.0 that might cause this issue. I created a branch that partly revert this change: android_bulk_transfer Its purpose is only to verify that this is indeed the cause so it might be very buggy. You can also consume it by changing the bintray repo to: https://dl.bintray.com/intel-realsense/librealsense-dev And specify version 2.23.0.372

dreifelix commented 5 years ago

Happy to share that your branch works! I have tested it on S7 + D435, no errors in the log. Will test it on the Pixel3 on Monday when I have the device with me. It worked with all three streams (color, depth, infrared) turned on simultaneously at low resolution and 15 fps each.

Thanks so much for the fix!

Mad-Thanos commented 5 years ago

Thanks! I'll give it a try and report the results at here.

Mad-Thanos commented 5 years ago

I tried librealsense 2.20.0 + firmware 5.11.04 on Honor V20 android phone, the example capture can work normally now. Here is the log:

Click me to expand ``` 2019-06-11 11:05:24.597 31246-31246/com.intel.realsense.capture I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED 2019-06-11 11:05:24.597 31246-31246/com.intel.realsense.capture I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED 2019-06-11 11:05:24.625 31246-31246/com.intel.realsense.capture I/librs UsbUtilities: grantUsbPermissions: device: UsbDevice[mName=/dev/bus/usb/002/002,mVendorId=32902,mProductId=2771,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 415 ,mProductName=Intel(R) RealSense(TM) Depth Camera 415 ,mVersion=50.114,mSerialNumber=null,mSubProductId =-1,mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]] UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[] UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]] 2019-06-11 11:05:24.781 31246-31276/com.intel.realsense.capture W/libEGL: EGLNativeWindowType 0x7cbe276010 disconnect failed 2019-06-11 11:05:24.795 31246-31271/com.intel.realsense.capture W/libEGL: EGLNativeWindowType 0x7cbfc3f010 disconnect failed 2019-06-11 11:05:24.804 31246-31246/com.intel.realsense.capture I/ViewRootImpl: jank_removeInvalidNode all the node in jank list is out of time 2019-06-11 11:05:28.181 31246-31246/com.intel.realsense.capture W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@cc8dd49 2019-06-11 11:05:28.222 31246-31246/com.intel.realsense.capture I/librs Enumerator: onReceive: USB_CONTROL_PERMISSION 2019-06-11 11:05:28.224 31246-31273/com.intel.realsense.capture I/librs MessagesHandler: handleMessage: realsense device attached 2019-06-11 11:05:28.224 31246-31273/com.intel.realsense.capture I/librs Enumerator: notifyOnAttach 2019-06-11 11:05:28.225 31246-31273/com.intel.realsense.capture I/usbhost: usb_device_new /dev/bus/usb/002/002 fd: 75 2019-06-11 11:05:28.225 31246-31273/com.intel.realsense.capture I/usbhost: usb_device_new read returned 1230 errno 0 2019-06-11 11:05:28.245 31246-31273/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- K path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:05:28.245 31246-31273/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- K path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:05:28.245 31246-31246/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- K path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:05:28.245 31246-31246/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- K path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:05:28.246 31246-31246/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- K path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:05:28.246 31246-31246/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- K path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:05:28.247 31246-31246/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- K path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:05:28.247 31246-31246/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- K path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:05:28.314 31246-31356/com.intel.realsense.capture E/librs: Cannot queue request: Out of memory 2019-06-11 11:05:28.319 31246-31246/com.intel.realsense.capture I/ViewRootImpl: jank_removeInvalidNode all the node in jank list is out of time 2019-06-11 11:05:31.978 31246-31265/com.intel.realsense.capture I/alsense.captur: Starting profile saver IsSaveProfileNow end. ```

however, I am not sure whether the third to last line in the above log is critical or could be ignored.

Mad-Thanos commented 5 years ago

And the example app capture built with librealsense-dev 2.23.0.372 can also work normally. Here is the log:

Click me to expand ``` 2019-06-11 11:20:43.757 1412-1412/com.intel.realsense.capture I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED 2019-06-11 11:20:43.795 1412-1412/com.intel.realsense.capture I/librs UsbUtilities: grantUsbPermissions: device: UsbDevice[mName=/dev/bus/usb/002/002,mVendorId=32902,mProductId=2771,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 415 ,mProductName=Intel(R) RealSense(TM) Depth Camera 415 ,mVersion=50.114,mSerialNumber=null,mSubProductId =-1,mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]] UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=512,mInterval=0]] UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[] UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]] 2019-06-11 11:20:43.951 1412-1446/com.intel.realsense.capture W/libEGL: EGLNativeWindowType 0x7cac44f010 disconnect failed 2019-06-11 11:20:43.965 1412-1442/com.intel.realsense.capture W/libEGL: EGLNativeWindowType 0x7cac4e6010 disconnect failed 2019-06-11 11:20:43.976 1412-1412/com.intel.realsense.capture I/ViewRootImpl: jank_removeInvalidNode all the node in jank list is out of time 2019-06-11 11:20:45.569 1412-1412/com.intel.realsense.capture W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@cc8dd49 2019-06-11 11:20:45.611 1412-1412/com.intel.realsense.capture I/librs Enumerator: onReceive: USB_CONTROL_PERMISSION 2019-06-11 11:20:45.613 1412-1444/com.intel.realsense.capture I/librs MessagesHandler: handleMessage: realsense device attached 2019-06-11 11:20:45.613 1412-1444/com.intel.realsense.capture I/librs Enumerator: notifyOnAttach 2019-06-11 11:20:45.614 1412-1444/com.intel.realsense.capture I/usbhost: usb_device_new /dev/bus/usb/002/002 fd: 77 2019-06-11 11:20:45.614 1412-1444/com.intel.realsense.capture I/usbhost: usb_device_new read returned 1230 errno 0 2019-06-11 11:20:45.615 1412-1444/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/002/002 path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:20:45.615 1412-1444/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/002/002 path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:20:45.615 1412-1412/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/002/002 path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:20:45.615 1412-1412/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/002/002 path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:20:45.616 1412-1412/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/002/002 path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:20:45.616 1412-1412/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/002/002 path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:20:45.616 1412-1412/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/002/002 path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:20:45.616 1412-1412/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/002/002 path- /dev/bus/usb/002/002 susb specification- 210 2019-06-11 11:20:45.672 1412-1515/com.intel.realsense.capture I/librs: USB pipe 130 reset successfully 2019-06-11 11:20:45.681 1412-1517/com.intel.realsense.capture I/librs: USB pipe 132 reset successfully 2019-06-11 11:20:49.215 1412-1428/com.intel.realsense.capture I/alsense.captur: Starting profile saver IsSaveProfileNow end. ```
Mad-Thanos commented 5 years ago

Hi @matkatz , Do you have any thoughts about the problem of the USB protocol version? That is, librealsense running on a USB 3.1 compliant android phone recognizes the D415 camera as a USB 2.1 device.

I've checked the cable and the phone using both a windows tool named 'ChipGenius' and the MacOS X System Report App on MacBook Pro.

On windows, I plugged my Honor V20 android phone into the USB 3.2 type-c port of the PC laptop, using the same c-to-c cable that I used to connect the android phone with the D415 camera. And the ChipGenius give me a USB detection result of the Honor V20 phone as follow:

Device Description: USB Composite Device (HUAWEI PCT-AL10)
  Equipment Type: Supplier Customization

  Protocol version: USB 3.10
  Current speed: High Speed
  Power consumption: 504mA

  USB device ID: VID = 12D1 PID = 107E
Equipment serial number: 5EN0219223001846

Equipment supplier: HUAWEI
  Equipment Name: PCT-AL10
Equipment revision: 0299

  Host/Master Controller model: Unknown

As you can see, the phone + the cable is recognized as USB 3.1 device.

on MacBook Pro (Retina, 13-inch, Early 2015 version), I got almost the same result: I think the Speed: Up to 5Gb/sec implies that the phone is connected to USB 3.0 port of my MacBook.

Honor V20 with MBP

So why it's susb specification- 210 when the D415 is connected to the same phone using the same cable? Am I missing something?


Added: However, in the first post of this issue, I ran librealsense 2.22.0+ capture app on Huawei P20(also support USB3.0). The D415 can be recognized as a USB 3.0 device. But at that time the app ran into the OOM problem. I'll try to build the capture app using librealsense-dev 2.23.0.372, run it on Huawei P20 and check if the D415 is recognized as a USB 3.0 device and if the OOM problem is gone.

matkatz commented 5 years ago

Thanks for the feedback!

I'm testing the library on 4 different platforms:

On all of those systems the camera(D415 FW 5.11.4.0) is identified as USB 3.2. It is possible that the camera will be detected as USB 2 in some cases, but unplug and plug back the camera should solve that.

I'm still not capable to reproduce the memory issue on those platforms, currently I'm working on both directions:

Mad-Thanos commented 5 years ago

I tried to build the example capture with librealsense-dev 2.23.0.372, and ran it on Huawei P20. something similar to issue #4215 happened. See this screencast video:

You could see that the frames were fitfully updated, the screen got stuck for a while and got updated later again, off and on repeatedly. I could see from the logcat a warning and an error message alternately appeared:

W/librs: Timeout reached waiting for response
E/librs: Cancel request failed: Invalid argument

The warning log seems to be similar to issue #3612.

But after switching librealsense to v2.20.0, and build the capture again, It worked correctly. It even could deliver 1280x720x30fps RGBD stream, since the D415 was enumerated as USB 3.2 device.

matkatz commented 5 years ago

I was finally able to reproduce the issue and able to see where is it coming from. From a reason that I’m not yet understand, the USB bulk transfer started to fail when the frame resolution size was larger than ~600KB.

To solve that I changed the read buffer size from default hard coded size to a value that is determined according to the current stream resolution.

Reducing the buffer size allows to configure and stream lower resolutions in case of “Out of memory” error.

I also tried to reassemble the frame from few smaller USB payloads but that didn’t work for me (I think it requires isochronous endpoint which is not supported by Android).

BTW, a reboot to the device that the issue was reproduced on (Pixel 2 - Android 9), eliminated the issue.

I will keep looking into this but first I want to apply the fix if it's mitigates the issue.

Once again I will ask you to check my fix before I push it to the development branch.

This is the branch: android-read-length-fix And it is also available in the dev repo (https://dl.bintray.com/intel-realsense/librealsense-dev) on bintray, version: 2.23.0.13

Thanks in advance!

Mad-Thanos commented 5 years ago

That's great! I'd like to try it out later in this day

dreifelix commented 5 years ago

The android-read-length-fix branch fails to stream using the camera sample app, even at lowest resolution at 6 fps when tested on my S7 + D435.

Logs on first run, with D435 already attached to USB port ``` $ adb shell am start -n "com.intel.realsense.camera/com.intel.realsense.camera.DetachedActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Waiting for process to come online Connected to process 14436 on device samsung-sm_g930f-192.168.43.1:5555 Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. I/zygote64: no shared libraies, dex_files: 1 I/InstantRun: starting instant run server: is main process D/librs: Librealsense VERSION: 2.23.0 D/librs UsbUtilities: hasUsbPermission I/librs MessagesHandler: handleMessage: realsense device attached I/librs Enumerator: notifyOnAttach D/librs DeviceWatcher: Adding device: /dev/bus/usb/001/002 D/librs: AddUsbDevice, previous device count: 0 AddUsbDevice, adding device: /dev/bus/usb/001/002, descriptor: 75 AddUsbDevice, create D/librs: AddUsbDevice, notify I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: AddUsbDevice, current device count: 1 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 D/librs: interrupt_request: 1, 3, 0, 7, 0, 0, E/librs: SetXU result:-1 D/librs: interrupt_request: 1, 3, 0, 7, 0, 0, D/OpenGLRenderer: HWUI GL Pipeline D/ViewRootImpl@edad6cd[DetachedActivity]: setView = DecorView@2e1b82[DetachedActivity] TM=true MM=false D/ViewRootImpl@edad6cd[DetachedActivity]: dispatchAttachedToWindow D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0 D/ViewRootImpl@edad6cd[DetachedActivity]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 506472833024} changed=true I/OpenGLRenderer: Initialized EGL, version 1.4 D/OpenGLRenderer: Swap behavior 2 D/libGLESv1: STS_GLApi : DTS, ODTC are not allowed for Package : com.intel.realsense.camera D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1 D/OpenGLRenderer: eglCreateWindowSurface = 0x75e64b1a40 D/librs DeviceWatcher: Device: /dev/bus/usb/001/002 added successfully D/ViewRootImpl@edad6cd[DetachedActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 63 - 0, 0) vi=Rect(0, 63 - 0, 0) or=1 D/ViewRootImpl@edad6cd[DetachedActivity]: MSG_WINDOW_FOCUS_CHANGED 1 V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@24b12c9 nm : com.intel.realsense.camera ic=null I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus W/LayerDrawable: Invalid drawable added to LayerDrawable! Drawable already belongs to another owner but does not expose a constant state. java.lang.RuntimeException at android.graphics.drawable.LayerDrawable$ChildDrawable.(LayerDrawable.java:1855) at android.graphics.drawable.LayerDrawable$LayerState.(LayerDrawable.java:1975) at android.graphics.drawable.RippleDrawable$RippleState.(RippleDrawable.java:1021) at android.graphics.drawable.RippleDrawable.createConstantState(RippleDrawable.java:1011) at android.graphics.drawable.RippleDrawable.createConstantState(RippleDrawable.java:1009) at android.graphics.drawable.LayerDrawable.mutate(LayerDrawable.java:1779) at android.graphics.drawable.RippleDrawable.mutate(RippleDrawable.java:997) at android.view.View.applyBackgroundTint(View.java:21827) at android.view.View.setBackgroundDrawable(View.java:21698) at android.support.design.widget.FloatingActionButton.access$001(FloatingActionButton.java:68) at android.support.design.widget.FloatingActionButton$ShadowDelegateImpl.setBackgroundDrawable(FloatingActionButton.java:824) at android.support.design.widget.FloatingActionButtonLollipop.setBackgroundDrawable(FloatingActionButtonLollipop.java:73) at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:179) at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:151) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.intel.realsense.camera.PreviewActivity.onCreate(PreviewActivity.java:56) at android.app.Activity.performCreate(Activity.java:7183) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) W/LayerDrawable: Invalid drawable added to LayerDrawable! Drawable already belongs to another owner but does not expose a constant state. java.lang.RuntimeException at android.graphics.drawable.LayerDrawable$ChildDrawable.(LayerDrawable.java:1855) at android.graphics.drawable.LayerDrawable$LayerState.(LayerDrawable.java:1975) at android.graphics.drawable.LayerDrawable.createConstantState(LayerDrawable.java:168) at android.graphics.drawable.LayerDrawable.mutate(LayerDrawable.java:1779) at android.graphics.drawable.LayerDrawable.mutate(LayerDrawable.java:1785) at android.graphics.drawable.RippleDrawable.mutate(RippleDrawable.java:997) at android.view.View.applyBackgroundTint(View.java:21827) at android.view.View.setBackgroundDrawable(View.java:21698) at android.support.design.widget.FloatingActionButton.access$001(FloatingActionButton.java:68) at android.support.design.widget.FloatingActionButton$ShadowDelegateImpl.setBackgroundDrawable(FloatingActionButton.java:824) at android.support.design.widget.FloatingActionButtonLollipop.setBackgroundDrawable(FloatingActionButtonLollipop.java:73) at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:179) at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:151) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.intel.realsense.camera.PreviewActivity.onCreate(PreviewActivity.java:56) at android.app.Activity.performCreate(Activity.java:7183) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) D/librs: Librealsense VERSION: 2.23.0 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. D/librs camera streamer: try start streaming D/librs: Librealsense VERSION: 2.23.0 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found 4 unreachable streams, 4 extrinsics deleted D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found 68 unreachable streams, 68 extrinsics deleted E/librs: SetXU result:-1 D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: USB pipe 131 reset successfully endpoint 131 read buffer size: 129856 D/librs: time_diff_keeper::start: _users_count = 1 I/librs: USB pipe 130 reset successfully endpoint 130 read buffer size: 259456 D/librs: time_diff_keeper::start: _users_count = 2 I/librs: USB pipe 132 reset successfully endpoint 132 read buffer size: 203776 D/librs: Transfer thread started for endpoint address: 131 W/librs: bulk_transfer returned error, endpoint: 131, error: Out of memory, number: 12 E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution I/librs: USB pipe 131 reset successfully D/librs: start join stream_thread Transfer thread stopped for endpoint address: 131 D/librs: Transfer thread started for endpoint address: 132 W/librs: bulk_transfer returned error, endpoint: 132, error: Out of memory, number: 12 E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution I/librs: USB pipe 132 reset successfully D/librs: start join stream_thread Transfer thread stopped for endpoint address: 132 D/librs: Transfer thread started for endpoint address: 130 W/librs: bulk_transfer returned error, endpoint: 130, error: Out of memory, number: 12 E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution I/librs: USB pipe 130 reset successfully D/librs: start join stream_thread Transfer thread stopped for endpoint address: 130 E/librs: SetXU result:-1 E/librs: SetXU result:-1 E/librs camera streamer: failed to start streaming D/librs: start join cb_thread cb_thread joined D/librs: start join cb_thread cb_thread joined D/librs: time_diff_keeper::stop: _users_count = 1 start join cb_thread cb_thread joined D/librs: time_diff_keeper::stop: _users_count = 0 time_diff_keeper::stop: stop object. D/librs: Notification: time_diff_keeper polling loop is being shut-down E/librs camera pr: UNKNOWN_ERROR I/Choreographer: Skipped 202 frames! The application may be doing too much work on its main thread. D/OpenGLRenderer: eglDestroySurface = 0x75e64b1a40 D/ViewRootImpl@edad6cd[DetachedActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true D/ViewRootImpl@edad6cd[DetachedActivity]: MSG_WINDOW_FOCUS_CHANGED 0 D/ViewRootImpl@8eece60[Toast]: setView = android.widget.LinearLayout{ecf4f19 V.E...... ......I. 0,0-0,0} TM=true MM=false V/Toast: Text: Jnva in android.widget.Toast$TN@eb47bde D/ViewRootImpl@8eece60[Toast]: dispatchAttachedToWindow V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0 D/ViewRootImpl@8eece60[Toast]: Relayout returned: old=[0,0][0,0] new=[254,1636][826,1752] result=0x27 surface={valid=true 506472833024} changed=true I/zygote64: Do partial code cache collection, code=25KB, data=29KB After code cache collection, code=24KB, data=29KB Increasing code cache capacity to 128KB D/librs: Librealsense VERSION: 2.23.0 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found 65 unreachable streams, 260 extrinsics deleted D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 I/zygote64: Do partial code cache collection, code=26KB, data=57KB After code cache collection, code=26KB, data=57KB Increasing code cache capacity to 256KB I/zygote64: Compiler allocated 9MB to compile void android.widget.TextView.(android.content.Context, android.util.AttributeSet, int, int) D/ViewRootImpl@526af9a[SettingsActivity]: setView = DecorView@615e0cb[SettingsActivity] TM=true MM=false D/ViewRootImpl@8eece60[Toast]: MSG_RESIZED_REPORT: frame=Rect(254, 1636 - 826, 1752) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1 V/InputMethodManager: Not IME target window, ignoring D/ViewRootImpl@526af9a[SettingsActivity]: dispatchAttachedToWindow I/zygote64: Compiler allocated 4MB to compile void android.view.View.(android.content.Context, android.util.AttributeSet, int, int) I/zygote64: Do full code cache collection, code=125KB, data=81KB After code cache collection, code=121KB, data=65KB I/zygote64: Do partial code cache collection, code=125KB, data=76KB After code cache collection, code=125KB, data=76KB Increasing code cache capacity to 512KB V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0 D/ViewRootImpl@526af9a[SettingsActivity]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 505948479488} changed=true D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1 D/OpenGLRenderer: eglCreateWindowSurface = 0x75e64b1a40 D/AbsListView: in onLayout changed I/zygote64: Do full code cache collection, code=250KB, data=157KB I/zygote64: After code cache collection, code=242KB, data=133KB D/AbsListView: in onLayout changed I/zygote64: Do partial code cache collection, code=245KB, data=150KB I/zygote64: After code cache collection, code=245KB, data=150KB Increasing code cache capacity to 1024KB D/ViewRootImpl@526af9a[SettingsActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 63 - 0, 0) vi=Rect(0, 63 - 0, 0) or=1 MSG_WINDOW_FOCUS_CHANGED 1 V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@672e898 nm : com.intel.realsense.camera ic=null I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@caf81e3 nm : com.intel.realsense.camera ic=null D/ViewRootImpl@edad6cd[DetachedActivity]: dispatchDetachedFromWindow D/InputEventReceiver: channel '9cbb623 com.intel.realsense.camera/com.intel.realsense.camera.DetachedActivity (client)' ~ Disposing input event receiver. channel '9cbb623 com.intel.realsense.camera/com.intel.realsense.camera.DetachedActivity (client)' ~NativeInputEventReceiver. D/ViewRootImpl@8eece60[Toast]: dispatchDetachedFromWindow D/InputEventReceiver: channel '5b61317 Toast (client)' ~ Disposing input event receiver. channel '5b61317 Toast (client)' ~NativeInputEventReceiver. ```
Logs when D435 is pulled and re-attached to the USB port ``` I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_DETACHED I/librs MessagesHandler: handleMessage: realsense device detached I/librs Enumerator: notifyOnDetach D/librs DeviceWatcher: Removing device: /dev/bus/usb/001/002 D/librs: RemoveUsbDevice, previous device count: 1 E/librs: Cancel request failed: No such device D/librs: usb device: /dev/bus/usb/001/002, released RemoveUsbDevice, removing device: /dev/bus/usb/001/002, descriptor: 75 RemoveUsbDevice, current device count: 0 D/UsbDeviceConnectionJNI: close D/librs DeviceWatcher: Device: /dev/bus/usb/001/002 removed successfully D/librs: Librealsense VERSION: 2.23.0 D/ViewRootImpl@68badc3[DetachedActivity]: setView = DecorView@3c9640[DetachedActivity] TM=true MM=false D/ViewRootImpl@526af9a[SettingsActivity]: MSG_WINDOW_FOCUS_CHANGED 0 D/ViewRootImpl@68badc3[DetachedActivity]: dispatchAttachedToWindow V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0 D/ViewRootImpl@68badc3[DetachedActivity]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 505948491776} changed=true D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1 D/OpenGLRenderer: eglCreateWindowSurface = 0x75ce20e630 D/ViewRootImpl@68badc3[DetachedActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 63 - 0, 0) vi=Rect(0, 63 - 0, 0) or=1 MSG_WINDOW_FOCUS_CHANGED 1 V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@39836be nm : com.intel.realsense.camera ic=null I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus D/OpenGLRenderer: eglDestroySurface = 0x75e64b1a40 I/zygote64: Compiler allocated 8MB to compile void android.view.ViewRootImpl.performTraversals() D/OpenGLRenderer: eglDestroySurface = 0x75e64b1a40 D/ViewRootImpl@526af9a[SettingsActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true D/ViewRootImpl@526af9a[SettingsActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x1 surface={valid=false 0} changed=false I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED D/librs UsbUtilities: hasUsbPermission I/librs MessagesHandler: handleMessage: realsense device attached I/librs Enumerator: notifyOnAttach D/librs DeviceWatcher: Adding device: /dev/bus/usb/001/002 D/librs: AddUsbDevice, previous device count: 0 AddUsbDevice, adding device: /dev/bus/usb/001/002, descriptor: 88 AddUsbDevice, create D/librs: AddUsbDevice, notify I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: AddUsbDevice, current device count: 1 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found 68 unreachable streams, 272 extrinsics deleted D/librs: interrupt_request: 1, 3, 0, 7, 0, 0, E/librs: SetXU result:-1 D/librs: interrupt_request: 1, 3, 0, 7, 0, 0, D/ViewRootImpl@68badc3[DetachedActivity]: MSG_WINDOW_FOCUS_CHANGED 0 D/ViewRootImpl@68badc3[DetachedActivity]: MSG_WINDOW_FOCUS_CHANGED 1 D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found 4 unreachable streams, 16 extrinsics deleted D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 D/librs DeviceWatcher: Device: /dev/bus/usb/001/002 added successfully I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found 4 unreachable streams, 16 extrinsics deleted D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 W/LayerDrawable: Invalid drawable added to LayerDrawable! Drawable already belongs to another owner but does not expose a constant state. java.lang.RuntimeException at android.graphics.drawable.LayerDrawable$ChildDrawable.(LayerDrawable.java:1855) at android.graphics.drawable.LayerDrawable$LayerState.(LayerDrawable.java:1975) at android.graphics.drawable.RippleDrawable$RippleState.(RippleDrawable.java:1021) at android.graphics.drawable.RippleDrawable.createConstantState(RippleDrawable.java:1011) at android.graphics.drawable.RippleDrawable.createConstantState(RippleDrawable.java:1009) at android.graphics.drawable.LayerDrawable.mutate(LayerDrawable.java:1779) at android.graphics.drawable.RippleDrawable.mutate(RippleDrawable.java:997) at android.view.View.applyBackgroundTint(View.java:21827) at android.view.View.setBackgroundDrawable(View.java:21698) at android.support.design.widget.FloatingActionButton.access$001(FloatingActionButton.java:68) at android.support.design.widget.FloatingActionButton$ShadowDelegateImpl.setBackgroundDrawable(FloatingActionButton.java:824) at android.support.design.widget.FloatingActionButtonLollipop.setBackgroundDrawable(FloatingActionButtonLollipop.java:73) at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:179) at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:151) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.intel.realsense.camera.PreviewActivity.onCreate(PreviewActivity.java:56) at android.app.Activity.performCreate(Activity.java:7183) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) W/LayerDrawable: Invalid drawable added to LayerDrawable! Drawable already belongs to another owner but does not expose a constant state. java.lang.RuntimeException at android.graphics.drawable.LayerDrawable$ChildDrawable.(LayerDrawable.java:1855) at android.graphics.drawable.LayerDrawable$LayerState.(LayerDrawable.java:1975) at android.graphics.drawable.LayerDrawable.createConstantState(LayerDrawable.java:168) at android.graphics.drawable.LayerDrawable.mutate(LayerDrawable.java:1779) at android.graphics.drawable.LayerDrawable.mutate(LayerDrawable.java:1785) at android.graphics.drawable.RippleDrawable.mutate(RippleDrawable.java:997) at android.view.View.applyBackgroundTint(View.java:21827) at android.view.View.setBackgroundDrawable(View.java:21698) at android.support.design.widget.FloatingActionButton.access$001(FloatingActionButton.java:68) at android.support.design.widget.FloatingActionButton$ShadowDelegateImpl.setBackgroundDrawable(FloatingActionButton.java:824) at android.support.design.widget.FloatingActionButtonLollipop.setBackgroundDrawable(FloatingActionButtonLollipop.java:73) at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:179) at android.support.design.widget.FloatingActionButton.(FloatingActionButton.java:151) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.intel.realsense.camera.PreviewActivity.onCreate(PreviewActivity.java:56) at android.app.Activity.performCreate(Activity.java:7183) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) D/librs: Librealsense VERSION: 2.23.0 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. D/librs camera streamer: try start streaming D/librs: Librealsense VERSION: 2.23.0 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found 4 unreachable streams, 16 extrinsics deleted D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found 68 unreachable streams, 272 extrinsics deleted E/librs: SetXU result:-1 D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 E/librs: SetXU result:-1 I/librs: USB pipe 131 reset successfully endpoint 131 read buffer size: 129856 D/librs: time_diff_keeper::start: _users_count = 1 I/librs: USB pipe 130 reset successfully I/librs: endpoint 130 read buffer size: 259456 D/librs: time_diff_keeper::start: _users_count = 2 I/librs: USB pipe 132 reset successfully endpoint 132 read buffer size: 203776 D/librs: Transfer thread started for endpoint address: 131 D/librs: Transfer thread started for endpoint address: 132 W/librs: bulk_transfer returned error, endpoint: 132, error: Out of memory, number: 12 E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution I/librs: USB pipe 132 reset successfully D/librs: start join stream_thread D/librs: Transfer thread stopped for endpoint address: 132 D/librs: Transfer thread started for endpoint address: 130 W/librs: bulk_transfer returned error, endpoint: 130, error: Out of memory, number: 12 E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution I/librs: USB pipe 130 reset successfully D/librs: start join stream_thread D/librs: Transfer thread stopped for endpoint address: 130 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 I/chatty: uid=10603(u0_a603) com.intel.realsense.camera identical 4 lines W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 E/librs camera streamer: failed to start streaming D/librs: start join cb_thread W/librs: bulk_transfer returned error, endpoint: 131, error: Connection timed out, number: 110 I/librs: USB pipe 131 reset successfully D/librs: start join stream_thread D/librs: Transfer thread stopped for endpoint address: 131 D/librs: cb_thread joined start join cb_thread D/librs: cb_thread joined D/librs: time_diff_keeper::stop: _users_count = 1 start join cb_thread D/librs: cb_thread joined D/librs: time_diff_keeper::stop: _users_count = 0 time_diff_keeper::stop: stop object. E/librs camera pr: UNKNOWN_ERROR D/ViewRootImpl@68badc3[DetachedActivity]: MSG_WINDOW_FOCUS_CHANGED 0 D/ViewRootImpl@a51e193[Toast]: setView = android.widget.LinearLayout{24a05d0 V.E...... ......I. 0,0-0,0} TM=true MM=false V/Toast: Text: Jnva in android.widget.Toast$TN@62a09c9 D/ViewRootImpl@a51e193[Toast]: dispatchAttachedToWindow V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0 D/ViewRootImpl@a51e193[Toast]: Relayout returned: old=[0,0][0,0] new=[254,1636][826,1752] result=0x7 surface={valid=true 505948725248} changed=true D/librs: Librealsense VERSION: 2.23.0 I/librs: Found UVC Device vid: id- vid- 8086 pid- b07 mi- 0 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 Found UVC Device vid: id- vid- 8086 pid- b07 mi- 3 unique_id- /dev/bus/usb/001/002 path- /dev/bus/usb/001/002 susb specification- 210 D/librs: try_fetch_usb_device(...) failed. D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 I/librs: Found 65 unreachable streams, 455 extrinsics deleted E/librs: SetXU result:-1 D/librs: Creating UVC Device from path: /dev/bus/usb/001/002 D/ViewRootImpl@c065583[SettingsActivity]: setView = DecorView@3128300[SettingsActivity] TM=true MM=false D/ViewRootImpl@a51e193[Toast]: MSG_RESIZED_REPORT: frame=Rect(254, 1636 - 826, 1752) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=1 V/InputMethodManager: Not IME target window, ignoring D/ViewRootImpl@c065583[SettingsActivity]: dispatchAttachedToWindow V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0 D/ViewRootImpl@c065583[SettingsActivity]: Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 505948639232} changed=true D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1 D/OpenGLRenderer: eglCreateWindowSurface = 0x75e64b19f0 D/AbsListView: in onLayout changed D/AbsListView: in onLayout changed I/zygote64: Do full code cache collection, code=504KB, data=342KB I/zygote64: After code cache collection, code=503KB, data=303KB D/AbsListView: in onLayout changed D/ViewRootImpl@c065583[SettingsActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 63 - 0, 0) vi=Rect(0, 63 - 0, 0) or=1 D/ViewRootImpl@c065583[SettingsActivity]: MSG_WINDOW_FOCUS_CHANGED 1 V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@b2208f0 nm : com.intel.realsense.camera ic=null I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus I/zygote64: Do partial code cache collection, code=504KB, data=310KB After code cache collection, code=504KB, data=310KB Increasing code cache capacity to 2MB D/OpenGLRenderer: eglDestroySurface = 0x75ce20e630 D/ViewRootImpl@68badc3[DetachedActivity]: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true D/ViewRootImpl@68badc3[DetachedActivity]: dispatchDetachedFromWindow D/InputEventReceiver: channel 'fa99c0a com.intel.realsense.camera/com.intel.realsense.camera.DetachedActivity (client)' ~ Disposing input event receiver. channel 'fa99c0a com.intel.realsense.camera/com.intel.realsense.camera.DetachedActivity (client)' ~NativeInputEventReceiver. D/ViewRootImpl@a51e193[Toast]: dispatchDetachedFromWindow D/InputEventReceiver: channel '58399ab Toast (client)' ~ Disposing input event receiver. channel '58399ab Toast (client)' ~NativeInputEventReceiver. ```
Mad-Thanos commented 5 years ago

I got a similar result to the one from @dreifelix. I was running the example app capture on Huawei P20 + librealsense-dev v2.23.0.13. Here is the code snippet to config and start the stream: image

The critical error in logcat:

2019-06-17 23:22:47.432 26320-27063/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 130, error: Out of memory, number: 12
2019-06-17 23:22:47.432 26320-27063/com.intel.realsense.capture E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution
Click to expand the detailed log ``` 2019-06-17 23:22:19.037 26320-26320/? I/zygote64: Late-enabling -Xcheck:jni 2019-06-17 23:22:19.052 26320-26320/? I/zygote64: Reinit property: dalvik.vm.checkjni= false 2019-06-17 23:22:19.068 26320-26320/? D/ActivityThread: Attach thread to application 2019-06-17 23:22:19.098 26320-26320/com.intel.realsense.capture D/HwFLClassLoader: get used feature list :/feature/used-list failed! 2019-06-17 23:22:19.098 26320-26320/com.intel.realsense.capture D/HwFLClassLoader: USE_FEATURE_LIST had not init! 2019-06-17 23:22:19.111 26320-26320/com.intel.realsense.capture E/MemoryLeakMonitorManager: MemoryLeakMonitor.jar is not exist! 2019-06-17 23:22:19.112 26320-26320/com.intel.realsense.capture E/Minikin: Could not get cmap table size! 2019-06-17 23:22:19.124 26320-26320/com.intel.realsense.capture I/HwCust: Constructor found for class android.app.HwCustActivityImpl 2019-06-17 23:22:19.124 26320-26320/com.intel.realsense.capture D/HwCust: Create obj success use class android.app.HwCustActivityImpl 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.intel.realsense.capture-RGVWOwpQW6ABvh6_z3R5nQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.intel.realsense.capture-RGVWOwpQW6ABvh6_z3R5nQ==/lib/arm64, /data/app/com.intel.realsense.capture-RGVWOwpQW6ABvh6_z3R5nQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]] 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.intel.realsense.capture-RGVWOwpQW6ABvh6_z3R5nQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.intel.realsense.capture-RGVWOwpQW6ABvh6_z3R5nQ==/lib/arm64, /data/app/com.intel.realsense.capture-RGVWOwpQW6ABvh6_z3R5nQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]] 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.intel.realsense.capture-RGVWOwpQW6ABvh6_z3R5nQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.intel.realsense.capture-RGVWOwpQW6ABvh6_z3R5nQ==/lib/arm64, /data/app/com.intel.realsense.capture-RGVWOwpQW6ABvh6_z3R5nQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]] 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-17 23:22:19.158 26320-26320/com.intel.realsense.capture I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-17 23:22:19.168 26320-26320/com.intel.realsense.capture D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f0c0006, context : com.intel.realsense.capture.MainActivity@432b82e, Nhwext : 0, get Blur : disable with , null 2019-06-17 23:22:19.168 26320-26320/com.intel.realsense.capture D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f0c0006, context : com.intel.realsense.capture.MainActivity@432b82e, Nhwext : 0, get Blur : disable with , null 2019-06-17 23:22:19.181 26320-26320/com.intel.realsense.capture I/librs capture example: CAMERA permission granted! 2019-06-17 23:22:19.183 26320-26320/com.intel.realsense.capture D/ActivityThread: add activity client record, r= ActivityRecord{b14a592 token=android.os.BinderProxy@5e17f73 {com.intel.realsense.capture/com.intel.realsense.capture.MainActivity}} token= android.os.BinderProxy@5e17f73 2019-06-17 23:22:19.211 26320-26320/com.intel.realsense.capture W/librs UsbUtilities: getUsbDevice: failed to locate USB device, VID: 0x8086, PID: 0x0000 2019-06-17 23:22:19.211 26320-26320/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-17 23:22:19.211 26320-26320/com.intel.realsense.capture W/librs UsbUtilities: hasUsbPermission: null USB device 2019-06-17 23:22:19.211 26320-26320/com.intel.realsense.capture W/librs UsbUtilities: getUsbDevice: failed to locate USB device, VID: 0x8086, PID: 0x0000 2019-06-17 23:22:19.211 26320-26320/com.intel.realsense.capture D/librs UsbUtilities: grantUsbPermissions 2019-06-17 23:22:19.211 26320-26320/com.intel.realsense.capture W/librs UsbUtilities: grantUsbPermissions: null USB device 2019-06-17 23:22:19.216 26320-26320/com.intel.realsense.capture W/VRSystemServiceManager: vr service is not alive 2019-06-17 23:22:19.222 26320-26320/com.intel.realsense.capture I/hwaps: HwAps: JNI_OnLoad 2019-06-17 23:22:19.224 26320-26320/com.intel.realsense.capture D/OpenGLRenderer: HWUI Binary is enabled 2019-06-17 23:22:19.227 26320-26348/com.intel.realsense.capture D/OpenGLRenderer: HWUI GL Pipeline 2019-06-17 23:22:19.266 26320-26348/com.intel.realsense.capture I/zygote64: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 2019-06-17 23:22:19.269 26320-26348/com.intel.realsense.capture I/OpenGLRenderer: Initialized EGL, version 1.4 2019-06-17 23:22:19.269 26320-26348/com.intel.realsense.capture D/OpenGLRenderer: Swap behavior 2 2019-06-17 23:22:19.276 26320-26348/com.intel.realsense.capture D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000 2019-06-17 23:22:19.287 26320-26344/com.intel.realsense.capture D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000 2019-06-17 23:22:19.312 26320-26320/com.intel.realsense.capture W/InputMethodManager: startInputReason = 1 2019-06-17 23:22:19.325 26320-26320/com.intel.realsense.capture W/InputMethodManager: startInputReason = 5 2019-06-17 23:22:45.027 26320-26320/com.intel.realsense.capture I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED 2019-06-17 23:22:45.058 26320-26320/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-17 23:22:45.059 26320-26320/com.intel.realsense.capture D/librs UsbUtilities: grantUsbPermissions 2019-06-17 23:22:45.060 26320-26320/com.intel.realsense.capture I/librs UsbUtilities: grantUsbPermissions: device: UsbDevice[mName=/dev/bus/usb/003/002,mVendorId=32902,mProductId=2771,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 415 ,mProductName=Intel(R) RealSense(TM) Depth Camera 415 ,mVersion=3.32,mSerialNumber=843613022726,mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]] UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=1024,mInterval=0]] UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=1024,mInterval=0]] UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[] UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=1024,mInterval=0]]]] 2019-06-17 23:22:45.325 26320-26348/com.intel.realsense.capture W/libEGL: EGLNativeWindowType 0x78f6a8c010 disconnect failed 2019-06-17 23:22:45.325 26320-26348/com.intel.realsense.capture D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000 2019-06-17 23:22:45.342 26320-26344/com.intel.realsense.capture W/libEGL: EGLNativeWindowType 0x78f6a8d010 disconnect failed 2019-06-17 23:22:45.342 26320-26344/com.intel.realsense.capture D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000 2019-06-17 23:22:46.240 26320-26320/com.intel.realsense.capture I/librs Enumerator: onReceive: USB_CONTROL_PERMISSION 2019-06-17 23:22:46.240 26320-26320/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-17 23:22:46.240 26320-26325/com.intel.realsense.capture I/zygote64: Do partial code cache collection, code=24KB, data=29KB 2019-06-17 23:22:46.241 26320-26325/com.intel.realsense.capture I/zygote64: After code cache collection, code=24KB, data=29KB 2019-06-17 23:22:46.241 26320-26325/com.intel.realsense.capture I/zygote64: Increasing code cache capacity to 128KB 2019-06-17 23:22:46.241 26320-26320/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-17 23:22:46.242 26320-26345/com.intel.realsense.capture I/librs MessagesHandler: handleMessage: realsense device attached 2019-06-17 23:22:46.242 26320-26345/com.intel.realsense.capture I/librs Enumerator: notifyOnAttach 2019-06-17 23:22:46.244 26320-26345/com.intel.realsense.capture I/usbhost: usb_device_new /dev/bus/usb/003/002 fd: 77 2019-06-17 23:22:46.244 26320-26345/com.intel.realsense.capture I/usbhost: usb_device_new read returned 2866 errno 0 2019-06-17 23:22:46.244 26320-26345/com.intel.realsense.capture D/librs DeviceWatcher: Adding device: /dev/bus/usb/003/002 2019-06-17 23:22:46.244 26320-26345/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-17 23:22:46.244 26320-26345/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-17 23:22:46.244 26320-26345/com.intel.realsense.capture D/librs DeviceWatcher: Device: /dev/bus/usb/003/002 added successfully 2019-06-17 23:22:47.314 26320-26320/com.intel.realsense.capture D/HwCust: Create obj success use class android.app.HwCustActivityImpl 2019-06-17 23:22:47.335 26320-26320/com.intel.realsense.capture D/HwGalleryCacheManagerImpl: mIsEffect:false 2019-06-17 23:22:47.340 26320-26320/com.intel.realsense.capture D/ActivityThread: add activity client record, r= ActivityRecord{97431af token=android.os.BinderProxy@3c1d5b6 {com.intel.realsense.capture/com.intel.realsense.librealsense.DeviceWatcherActivity}} token= android.os.BinderProxy@3c1d5b6 2019-06-17 23:22:47.397 26320-26320/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-17 23:22:47.398 26320-26320/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-17 23:22:47.399 26320-26320/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-17 23:22:47.399 26320-26320/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-17 23:22:47.400 26320-26320/com.intel.realsense.capture D/librs capture example: try start streaming 2019-06-17 23:22:47.400 26320-26320/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-17 23:22:47.400 26320-26320/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-17 23:22:47.428 26320-27063/com.intel.realsense.capture I/librs: USB pipe 130 reset successfully 2019-06-17 23:22:47.428 26320-27063/com.intel.realsense.capture I/librs: endpoint 130 read buffer size: 614648 2019-06-17 23:22:47.431 26320-26320/com.intel.realsense.capture D/librs capture example: streaming started successfully 2019-06-17 23:22:47.432 26320-27063/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 130, error: Out of memory, number: 12 2019-06-17 23:22:47.432 26320-27063/com.intel.realsense.capture E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution 2019-06-17 23:22:47.432 26320-27064/com.intel.realsense.capture I/librs: USB pipe 132 reset successfully 2019-06-17 23:22:47.432 26320-27064/com.intel.realsense.capture I/librs: endpoint 132 read buffer size: 614648 2019-06-17 23:22:47.433 26320-27063/com.intel.realsense.capture I/librs: USB pipe 130 reset successfully 2019-06-17 23:22:47.438 26320-27064/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 132, error: Out of memory, number: 12 2019-06-17 23:22:47.438 26320-27064/com.intel.realsense.capture E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution 2019-06-17 23:22:47.438 26320-27064/com.intel.realsense.capture I/librs: USB pipe 132 reset successfully 2019-06-17 23:22:48.443 26320-26320/com.intel.realsense.capture E/librs capture example: streaming, error: UNKNOWN_ERROR 2019-06-17 23:22:48.448 26320-26320/com.intel.realsense.capture D/ActivityThread: Remove activity client record, r= ActivityRecord{97431af token=android.os.BinderProxy@3c1d5b6 {com.intel.realsense.capture/com.intel.realsense.librealsense.DeviceWatcherActivity}} token= android.os.BinderProxy@3c1d5b6 ```
matkatz commented 5 years ago

Thanks again for your help!

@dreifelix, do you see the same behavior with the Pixel? did you try to reboot the phone? Also, I see some strange issues with specific configurations (6 FPS) on my platforms when connecting via USB2. If you get to test it again please try to config only depth 640x480x30 as first step.

I also want to share with you the reason for trying to solve this issue and not revert the backend changes.

This is the performance of v2.23.0 (when it does work (: ) v2 23 0

While this is v2.20.0 results: v2 20 0

I'll keep digging...

dreifelix commented 5 years ago

Rebooting helped! :)

In my S7, I am able to stream up to 60 fps when running 2 streams at a time, and up to 30 fps when running all 3 streams simultaneously, at the lowest resolution (424x240 for color, 480x270 for infrared and depth). At 640x480 resolution, only infrared works, up to 30 fps.

I noticed the performance improvement as well. I wasn't able to reach the above frame rates in the android_bulk_transfer branch - the streams were freezing intermittently at 30 fps when running simultaneously.

As you noted, I am unable to run any of the streams at 6 fps at any resolution, but that's fine :) I will try it on the Pixel 3 when I get the chance - i'm just borrowing the device from another project team.

Looking forward to have your changes merged in the next release. Thanks so much for looking into this!

matkatz commented 5 years ago

Thanks @dreifelix I still need to understand what is bringing the phone to this state.

@GucciPrada, I guess reboot didn't help with the P20?

Mad-Thanos commented 5 years ago

Hi @matkatz I've never tried to reboot the phone. I'll try it today.

Mad-Thanos commented 5 years ago

Sorry for this late report!

I've tried the librealsense-dev 2.23.0.13, ran capture on Huawei P20 for 640x480@30fps RGBD. Before restarting the phone, I got the same result as before: the app cannot receive any frame correctly.

log before Huawei P20 restarted ``` 2019-06-25 23:11:37.497 2406-2406/? I/zygote64: Late-enabling -Xcheck:jni 2019-06-25 23:11:37.511 2406-2406/? I/zygote64: Reinit property: dalvik.vm.checkjni= false 2019-06-25 23:11:37.524 2406-2406/? D/ActivityThread: Attach thread to application 2019-06-25 23:11:37.550 2406-2406/? D/HwFLClassLoader: get used feature list :/feature/used-list failed! 2019-06-25 23:11:37.550 2406-2406/? D/HwFLClassLoader: USE_FEATURE_LIST had not init! 2019-06-25 23:11:37.565 2406-2413/? I/zygote64: Debugger is no longer active 2019-06-25 23:11:37.568 2406-2406/? E/MemoryLeakMonitorManager: MemoryLeakMonitor.jar is not exist! 2019-06-25 23:11:37.569 2406-2406/? E/Minikin: Could not get cmap table size! 2019-06-25 23:11:37.579 2406-2406/? I/HwCust: Constructor found for class android.app.HwCustActivityImpl 2019-06-25 23:11:37.579 2406-2406/? D/HwCust: Create obj success use class android.app.HwCustActivityImpl 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.intel.realsense.capture-IVc-vmqH7F7WSw1gEP4S2w==/base.apk"],nativeLibraryDirectories=[/data/app/com.intel.realsense.capture-IVc-vmqH7F7WSw1gEP4S2w==/lib/arm64, /data/app/com.intel.realsense.capture-IVc-vmqH7F7WSw1gEP4S2w==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]] 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.intel.realsense.capture-IVc-vmqH7F7WSw1gEP4S2w==/base.apk"],nativeLibraryDirectories=[/data/app/com.intel.realsense.capture-IVc-vmqH7F7WSw1gEP4S2w==/lib/arm64, /data/app/com.intel.realsense.capture-IVc-vmqH7F7WSw1gEP4S2w==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]] 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-25 23:11:37.611 2406-2406/? I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.intel.realsense.capture-IVc-vmqH7F7WSw1gEP4S2w==/base.apk"],nativeLibraryDirectories=[/data/app/com.intel.realsense.capture-IVc-vmqH7F7WSw1gEP4S2w==/lib/arm64, /data/app/com.intel.realsense.capture-IVc-vmqH7F7WSw1gEP4S2w==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]] 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, android.support.v4.view.OnApplyWindowInsetsListener) (ViewCompat.java:2203) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at android.view.ViewGroup android.support.v7.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:637) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.support.v7.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void com.intel.realsense.capture.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:45) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7352) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7343) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3110) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3268) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1888) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:109) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.os.Looper.loop() (Looper.java:166) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7367) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:469) 2019-06-25 23:11:37.612 2406-2406/? I/zygote64: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:963) 2019-06-25 23:11:37.621 2406-2406/? D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f0c0006, context : com.intel.realsense.capture.MainActivity@c97a485, Nhwext : 0, get Blur : disable with , null 2019-06-25 23:11:37.621 2406-2406/? D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f0c0006, context : com.intel.realsense.capture.MainActivity@c97a485, Nhwext : 0, get Blur : disable with , null 2019-06-25 23:11:37.634 2406-2406/? I/librs capture example: CAMERA permission granted! 2019-06-25 23:11:37.636 2406-2406/? D/ActivityThread: add activity client record, r= ActivityRecord{b3239 token=android.os.BinderProxy@8e7f7ce {com.intel.realsense.capture/com.intel.realsense.capture.MainActivity}} token= android.os.BinderProxy@8e7f7ce 2019-06-25 23:11:37.665 2406-2406/? W/librs UsbUtilities: getUsbDevice: failed to locate USB device, VID: 0x8086, PID: 0x0000 2019-06-25 23:11:37.666 2406-2406/? D/librs UsbUtilities: hasUsbPermission 2019-06-25 23:11:37.666 2406-2406/? W/librs UsbUtilities: hasUsbPermission: null USB device 2019-06-25 23:11:37.666 2406-2406/? W/librs UsbUtilities: getUsbDevice: failed to locate USB device, VID: 0x8086, PID: 0x0000 2019-06-25 23:11:37.666 2406-2406/? D/librs UsbUtilities: grantUsbPermissions 2019-06-25 23:11:37.666 2406-2406/? W/librs UsbUtilities: grantUsbPermissions: null USB device 2019-06-25 23:11:37.671 2406-2406/? W/VRSystemServiceManager: vr service is not alive 2019-06-25 23:11:37.676 2406-2406/? I/hwaps: HwAps: JNI_OnLoad 2019-06-25 23:11:37.678 2406-2406/? D/OpenGLRenderer: HWUI Binary is enabled 2019-06-25 23:11:37.679 2406-2453/? D/OpenGLRenderer: HWUI GL Pipeline 2019-06-25 23:11:37.721 2406-2453/? I/zygote64: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 2019-06-25 23:11:37.727 2406-2453/? I/OpenGLRenderer: Initialized EGL, version 1.4 2019-06-25 23:11:37.727 2406-2453/? D/OpenGLRenderer: Swap behavior 2 2019-06-25 23:11:37.745 2406-2450/? D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000 2019-06-25 23:11:37.751 2406-2453/? D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000 2019-06-25 23:11:37.770 2406-2406/? W/InputMethodManager: startInputReason = 1 2019-06-25 23:11:37.773 2406-2406/? W/InputMethodManager: startInputReason = 5 2019-06-25 23:11:50.456 2406-2406/com.intel.realsense.capture I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED 2019-06-25 23:11:50.513 2406-2406/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-25 23:11:50.515 2406-2406/com.intel.realsense.capture D/librs UsbUtilities: grantUsbPermissions 2019-06-25 23:11:50.515 2406-2406/com.intel.realsense.capture I/librs UsbUtilities: grantUsbPermissions: device: UsbDevice[mName=/dev/bus/usb/003/002,mVendorId=32902,mProductId=2771,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 415 ,mProductName=Intel(R) RealSense(TM) Depth Camera 415 ,mVersion=3.32,mSerialNumber=843613022726,mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]] UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=1024,mInterval=0]] UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=1024,mInterval=0]] UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[] UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=1024,mInterval=0]]]] 2019-06-25 23:11:50.752 2406-2453/com.intel.realsense.capture W/libEGL: EGLNativeWindowType 0x7174074010 disconnect failed 2019-06-25 23:11:50.753 2406-2453/com.intel.realsense.capture D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000 2019-06-25 23:11:50.777 2406-2450/com.intel.realsense.capture W/libEGL: EGLNativeWindowType 0x7174075010 disconnect failed 2019-06-25 23:11:50.778 2406-2450/com.intel.realsense.capture D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000 2019-06-25 23:11:58.462 2406-2406/com.intel.realsense.capture I/librs Enumerator: onReceive: USB_CONTROL_PERMISSION 2019-06-25 23:11:58.463 2406-2406/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-25 23:11:58.464 2406-2406/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-25 23:11:58.464 2406-2451/com.intel.realsense.capture I/librs MessagesHandler: handleMessage: realsense device attached 2019-06-25 23:11:58.464 2406-2451/com.intel.realsense.capture I/librs Enumerator: notifyOnAttach 2019-06-25 23:11:58.466 2406-2451/com.intel.realsense.capture I/usbhost: usb_device_new /dev/bus/usb/003/002 fd: 76 2019-06-25 23:11:58.466 2406-2451/com.intel.realsense.capture I/usbhost: usb_device_new read returned 2866 errno 0 2019-06-25 23:11:58.467 2406-2451/com.intel.realsense.capture D/librs DeviceWatcher: Adding device: /dev/bus/usb/003/002 2019-06-25 23:11:58.467 2406-2451/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:11:58.467 2406-2451/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:11:58.467 2406-2451/com.intel.realsense.capture D/librs DeviceWatcher: Device: /dev/bus/usb/003/002 added successfully 2019-06-25 23:11:59.319 2406-2406/com.intel.realsense.capture D/HwCust: Create obj success use class android.app.HwCustActivityImpl 2019-06-25 23:11:59.340 2406-2406/com.intel.realsense.capture D/HwGalleryCacheManagerImpl: mIsEffect:false 2019-06-25 23:11:59.345 2406-2406/com.intel.realsense.capture D/ActivityThread: add activity client record, r= ActivityRecord{d01b63a token=android.os.BinderProxy@e9711ad {com.intel.realsense.capture/com.intel.realsense.librealsense.DeviceWatcherActivity}} token= android.os.BinderProxy@e9711ad 2019-06-25 23:11:59.403 2406-2406/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:11:59.403 2406-2406/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:11:59.406 2406-2406/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:11:59.406 2406-2406/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:11:59.407 2406-2406/com.intel.realsense.capture D/librs capture example: try start streaming 2019-06-25 23:11:59.407 2406-2406/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:11:59.407 2406-2406/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:11:59.433 2406-3374/com.intel.realsense.capture I/librs: USB pipe 130 reset successfully 2019-06-25 23:11:59.433 2406-3374/com.intel.realsense.capture I/librs: endpoint 130 read buffer size: 614648 2019-06-25 23:11:59.438 2406-3374/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 130, error: Out of memory, number: 12 2019-06-25 23:11:59.438 2406-3374/com.intel.realsense.capture E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution 2019-06-25 23:11:59.438 2406-3374/com.intel.realsense.capture I/librs: USB pipe 130 reset successfully 2019-06-25 23:11:59.438 2406-2406/com.intel.realsense.capture D/librs capture example: streaming started successfully 2019-06-25 23:11:59.439 2406-3377/com.intel.realsense.capture I/librs: USB pipe 132 reset successfully 2019-06-25 23:11:59.439 2406-3377/com.intel.realsense.capture I/librs: endpoint 132 read buffer size: 614648 2019-06-25 23:11:59.578 2406-3377/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 132, error: Out of memory, number: 12 2019-06-25 23:11:59.578 2406-3377/com.intel.realsense.capture E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution 2019-06-25 23:11:59.580 2406-3377/com.intel.realsense.capture I/librs: USB pipe 132 reset successfully 2019-06-25 23:12:00.453 2406-2406/com.intel.realsense.capture E/librs capture example: streaming, error: UNKNOWN_ERROR 2019-06-25 23:12:00.458 2406-2406/com.intel.realsense.capture D/ActivityThread: Remove activity client record, r= ActivityRecord{d01b63a token=android.os.BinderProxy@e9711ad {com.intel.realsense.capture/com.intel.realsense.librealsense.DeviceWatcherActivity}} token= android.os.BinderProxy@e9711ad 2019-06-25 23:12:10.644 2406-2406/com.intel.realsense.capture I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_DETACHED 2019-06-25 23:12:10.644 2406-2451/com.intel.realsense.capture I/librs MessagesHandler: handleMessage: realsense device detached 2019-06-25 23:12:10.644 2406-2451/com.intel.realsense.capture I/librs Enumerator: notifyOnDetach 2019-06-25 23:12:10.646 2406-2451/com.intel.realsense.capture D/librs DeviceWatcher: Removing device: /dev/bus/usb/003/002 2019-06-25 23:12:10.646 2406-2451/com.intel.realsense.capture E/librs: Cancel request failed: No such device 2019-06-25 23:12:10.653 2406-2451/com.intel.realsense.capture D/UsbDeviceConnectionJNI: close 2019-06-25 23:12:10.655 2406-2451/com.intel.realsense.capture D/librs capture example: try stop streaming 2019-06-25 23:12:10.663 2406-2451/com.intel.realsense.capture D/librs capture example: streaming stopped successfully 2019-06-25 23:12:10.664 2406-2451/com.intel.realsense.capture D/librs DeviceWatcher: Device: /dev/bus/usb/003/002 removed successfully ```

After rebooting the phone, I got a different result: The color stream was streaming correctly. But the depth stream was stuck after several frames were delivered. I pasted the log below:

log after Huawei P20 rebooted ``` 2019-06-25 23:17:59.312 6765-6765/com.intel.realsense.capture I/librs Enumerator: onReceive: android.hardware.usb.action.USB_DEVICE_ATTACHED 2019-06-25 23:17:59.522 6765-6765/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-25 23:17:59.525 6765-6765/com.intel.realsense.capture D/librs UsbUtilities: grantUsbPermissions 2019-06-25 23:17:59.526 6765-6765/com.intel.realsense.capture I/librs UsbUtilities: grantUsbPermissions: device: UsbDevice[mName=/dev/bus/usb/003/002,mVendorId=32902,mProductId=2771,mClass=239,mSubclass=2,mProtocol=1,mManufacturerName=Intel(R) RealSense(TM) Depth Camera 415 ,mProductName=Intel(R) RealSense(TM) Depth Camera 415 ,mVersion=3.32,mSerialNumber=843613022726,mConfigurations=[ UsbConfiguration[mId=1,mName=null,mAttributes=192,mMaxPower=55,mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=135,mAttributes=3,mMaxPacketSize=64,mInterval=6]] UsbInterface[mId=1,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Depth,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=1024,mInterval=0]] UsbInterface[mId=2,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 Y,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=131,mAttributes=2,mMaxPacketSize=1024,mInterval=0]] UsbInterface[mId=3,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=1,mProtocol=0,mEndpoints=[] UsbInterface[mId=4,mAlternateSetting=0,mName=Intel(R) RealSense(TM) Depth Camera 415 RGB,mClass=14,mSubclass=2,mProtocol=0,mEndpoints=[ UsbEndpoint[mAddress=132,mAttributes=2,mMaxPacketSize=1024,mInterval=0]]]] 2019-06-25 23:18:06.156 6765-6765/com.intel.realsense.capture I/librs Enumerator: onReceive: USB_CONTROL_PERMISSION 2019-06-25 23:18:06.160 6765-6765/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-25 23:18:06.175 6765-6765/com.intel.realsense.capture D/librs UsbUtilities: hasUsbPermission 2019-06-25 23:18:06.177 6765-6786/com.intel.realsense.capture I/librs MessagesHandler: handleMessage: realsense device attached 2019-06-25 23:18:06.177 6765-6786/com.intel.realsense.capture I/librs Enumerator: notifyOnAttach 2019-06-25 23:18:06.182 6765-6770/com.intel.realsense.capture I/zygote64: Do partial code cache collection, code=22KB, data=29KB 2019-06-25 23:18:06.185 6765-6770/com.intel.realsense.capture I/zygote64: After code cache collection, code=22KB, data=29KB 2019-06-25 23:18:06.186 6765-6770/com.intel.realsense.capture I/zygote64: Increasing code cache capacity to 128KB 2019-06-25 23:18:06.194 6765-6786/com.intel.realsense.capture I/usbhost: usb_device_new /dev/bus/usb/003/002 fd: 86 2019-06-25 23:18:06.194 6765-6786/com.intel.realsense.capture I/usbhost: usb_device_new read returned 2866 errno 0 2019-06-25 23:18:06.196 6765-6786/com.intel.realsense.capture D/librs DeviceWatcher: Adding device: /dev/bus/usb/003/002 2019-06-25 23:18:06.211 6765-6786/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:18:06.212 6765-6786/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:18:06.214 6765-6786/com.intel.realsense.capture D/librs DeviceWatcher: Device: /dev/bus/usb/003/002 added successfully 2019-06-25 23:18:06.763 6765-6765/com.intel.realsense.capture D/HwCust: Create obj success use class android.app.HwCustActivityImpl 2019-06-25 23:18:06.791 6765-6765/com.intel.realsense.capture D/HwGalleryCacheManagerImpl: mIsEffect:false 2019-06-25 23:18:06.798 6765-6765/com.intel.realsense.capture D/ActivityThread: add activity client record, r= ActivityRecord{8071a93 token=android.os.BinderProxy@ff8892a {com.intel.realsense.capture/com.intel.realsense.librealsense.DeviceWatcherActivity}} token= android.os.BinderProxy@ff8892a 2019-06-25 23:18:06.845 6765-6765/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:18:06.845 6765-6765/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:18:06.847 6765-6765/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:18:06.847 6765-6765/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:18:06.849 6765-6765/com.intel.realsense.capture D/librs capture example: try start streaming 2019-06-25 23:18:06.849 6765-6765/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 0 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:18:06.849 6765-6765/com.intel.realsense.capture I/librs: Found UVC Device vid: id- vid- 8086 pid- ad3 mi- 3 unique_id- /dev/bus/usb/003/002 path- /dev/bus/usb/003/002 susb specification- 320 2019-06-25 23:18:06.882 6765-8183/com.intel.realsense.capture I/librs: USB pipe 130 reset successfully 2019-06-25 23:18:06.882 6765-8183/com.intel.realsense.capture I/librs: endpoint 130 read buffer size: 614648 2019-06-25 23:18:06.886 6765-8185/com.intel.realsense.capture I/librs: USB pipe 132 reset successfully 2019-06-25 23:18:06.886 6765-8185/com.intel.realsense.capture I/librs: endpoint 132 read buffer size: 614648 2019-06-25 23:18:06.886 6765-6765/com.intel.realsense.capture D/librs capture example: streaming started successfully 2019-06-25 23:18:06.985 6765-8183/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 130, error: Connection timed out, number: 110 2019-06-25 23:18:06.989 6765-8185/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 132, error: Connection timed out, number: 110 2019-06-25 23:18:07.190 6765-8185/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 132, error: Connection timed out, number: 110 2019-06-25 23:18:07.289 6765-8185/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 132, error: Connection timed out, number: 110 2019-06-25 23:18:12.506 6765-6770/com.intel.realsense.capture I/zygote64: Do partial code cache collection, code=61KB, data=55KB 2019-06-25 23:18:12.509 6765-6770/com.intel.realsense.capture I/zygote64: After code cache collection, code=61KB, data=55KB 2019-06-25 23:18:12.509 6765-6770/com.intel.realsense.capture I/zygote64: Increasing code cache capacity to 256KB 2019-06-25 23:18:12.568 6765-8183/com.intel.realsense.capture W/librs: bulk_transfer returned error, endpoint: 130, error: Out of memory, number: 12 2019-06-25 23:18:12.568 6765-8183/com.intel.realsense.capture E/librs: USB transfer failed, the max read buffer size is smaller than the current resolution requires, try to configure lower resolution 2019-06-25 23:18:12.570 6765-8183/com.intel.realsense.capture I/librs: USB pipe 130 reset successfully 2019-06-25 23:18:16.149 6765-6765/com.intel.realsense.capture D/ActivityThread: Remove activity client record, r= ActivityRecord{8071a93 token=android.os.BinderProxy@ff8892a {com.intel.realsense.capture/com.intel.realsense.librealsense.DeviceWatcherActivity}} token= android.os.BinderProxy@ff8892a ```

Then I tried to kill the app several times or tried to keep the D415 plugged into the phone, then reopen the capture app, everything was ok again. That was wired!

And one more trial, after the phone was rebooted, I reinstalled the capture app through Android Studio. Then I got the same error result as the very beginning, i.e. both color and depth stream was stuck while the D415 plugged in. So I tried to reboot the phone and reopen or kill the capture app with the D415 plugged in, sometimes the app could work correctly.

In a word, it's not stable and I didn't find a consistent way to make the app work correctly.

matkatz commented 5 years ago

Thanks @GucciPrada. I don't have a solution for the "Out of memory" state yet. Will update once I'll have some news regarding this issue.

Mad-Thanos commented 5 years ago

OK, thanks!

matkatz commented 4 years ago

@xtrawurst let's continue the conversation on this thread.

I'm trying to revert the bulk transfer changes and use USB requests instead. After removing some locks and extra copies I'm getting the same performance as I got with bulk transfer, hopefully without the OOM error. Since I'm not capable to reproduce that error on my devices I wanted to ask you to help me verify that I'm on the right direction. This is the branch: android-usb-request You can also consume it by changing the bintray repo to: https://dl.bintray.com/intel-realsense/librealsense-dev And specify version 2.24.0.67

rafaelspring commented 4 years ago

@matkatz Great, I'll give it a try and let you know!

rafaelspring commented 4 years ago

@matkatz Confirmed! I no longer see the issue on my Samsung Galaxy Tab S4, even when using Depth @ 1280x720 and RGB @ 1920x1080. Will test on other devices too.

Quick question: What's, roughly, the processing being done CPU-sided on each frame in libRS after the USB transmission completes? At full size capture the frame rate on my S4 is below 30 fps and I'm trying to figure out if it's a) The USB transfer taking a long time, b) CPU-sided processing in libRS or c) CPU-sided processing on our end.

Mad-Thanos commented 4 years ago

@matkatz Glad to hear this. I'll give it a try today.

@xtrawurst May I ask, what frame rate specifically you got at full-size capture(Depth @ 1280x720 and RGB @ 1920x1080)?

matkatz commented 4 years ago

@xtrawurst Thanks! This is good news, except that now I get OOM error on high bandwidth configuration with devices that worked with no issues. So I need to check that now... ):

As for processing, depends on the image format you request, a conversion may be done over the CPU. For example requesting RGB8 requires more CPU than YUYV which is the native format and doesn't requires any processing except a single memcopy.

On the USB transactions I see strange behavior with the color stream on high resolutions (720p & 1080p). In both resolutions the transaction time seems to be longer than the time measured on the depth stream although the resolution, bytes per pixel and frequency are identical for the 720p. Currently with both 720p and 1080p color I get 15 FPS, while depth streams @ ~27-30 FPS

Mad-Thanos commented 4 years ago

Hi @matkatz I got the same good news as @xtrawurst, that the example app capture running on Huawei P20 device can deliver 1920x1080 Color and 1280x720 Depth both at 15fps:

it can also deliver 640x360 Depth@23-26fps and 1280x720 Color @15fps. The firmware version is still 5.11.04 on my D415 camera. I'll update it to the newest and test it again.

Yes, it's really weird that the color stream ran at a much lower frame rate than the depth stream with the same resolution and pixel size.

matkatz commented 4 years ago

@GucciPrada Thanks for the update, I hope to push this change to the development branch soon, but first I need to understand why my RK3399 started to show OOM error.

ndiremdjian commented 4 years ago

Hi Guys, Not sure if this issue is fully SW related, I was experiencing the same on Sony Xperia but I came to suspect my USB3 cable (I used so far a 2m from nedis). With this cable the capture app last about 27s before crashing with the bulk_transfer error above at 60fps VGA. Lowering frame rate was just delaying the crash (30 fps about 50s etc...)

I then switched for another cable (1m from belkin) and I wasn't able to reproduce the error anymore.

Sounds a bit too magic and witchware but still, if it may help one of you...

Cheers

Mad-Thanos commented 4 years ago

Hi @ndiremdjian Which version of librealsense and firmware did you use? When built with librealsense v2.22.0 and firmware 5.11.4, the capture app, running at VGA@30fps, didn't crash on my phone with a USB3.1 type-c to type-c cable.

And thanks for your tips, I will try some other cables.

ndiremdjian commented 4 years ago

Hi I have the same versions as yours. My initial cable was a 2m 3.1 type c to type c 5Gbps. My second cable was a Thunderbolt 3 USB-C 20Gbps with backward compatibility USB3.1 10Gbps. With the later, no error is showing up even at 60fps VGA with Depth and both IR streams on. Will try to add RGB as well.

Cheers

rafaelspring commented 4 years ago

@matkatz Thanks for the information. Any updates on the Android-USB front?

matkatz commented 4 years ago

I will try to merge #4428 to the development branch before our next release.

rafaelspring commented 4 years ago

@matkatz Thanks

On the USB transactions I see strange behavior with the color stream on high resolutions (720p & 1080p). In both resolutions the transaction time seems to be longer than the time measured on the depth stream although the resolution, bytes per pixel and frequency are identical for the 720p. Currently with both 720p and 1080p color I get 15 FPS, while depth streams @ ~27-30 FPS

Has this been resolved?

matkatz commented 4 years ago

Not yet, currently both implementations shows this behavior.

RealSenseCustomerSupport commented 4 years ago

@GucciPrada @xtrawurst The latest SDK v2.30 has improved android stability according to our testing. Could you please try if you still get any issue? Thanks!

Mad-Thanos commented 4 years ago

Yes, I will try it in the following days. Thank you!

RealSenseCustomerSupport commented 4 years ago

@GucciPrada Thanks! Looking forward to your update.

RealSenseCustomerSupport commented 4 years ago

@GucciPrada @xtrawurst Any update with SDK v2.30? Thanks!

kafan1986 commented 4 years ago

@matkatz @RealSenseCustomerSupport I have received same OOM error on SDK 2.30.0 on android 9 (S922x SBC). My colour config is 1920x1080x15fps and depth is 1280x720x15. It works OK for few minutes and then crashes.

I/librs: endpoint 132 read buffer size: 4148224 I/librs: USB pipe 132 reset successfully I/librs: usb_request_queue returned error, endpoint: 132 error: Out of memory, number: 12 E/librs: failed to submit UVC request, error: -11

Mad-Thanos commented 4 years ago

Sorry for this late reply. I ran the RS Camera App v2.30.0.1174 on two Android Phones, Honor V20 and Huawei P30 Pro. The app could not open a single DEPTH stream(1280x720@15fps or 30fps) on those phones. Specifically, when I tried changing to the 15fps configuration on the Settings page, the App showed me a toast message:"Failed to set streaming configuration". Here is the captured log file when I changed the single DEPTH stream from 1280x720@6fps to 1280x720@15fps. But it could open a single 1280x720@6fps DEPTH stream or RGBD stream(RGB8-1280x720@6fps and DEPTH-1280x720@6fps). Here is the log.txt while runing the 1280x720@6fps RGBD stream.

I guess the reason is: the connection type is considered as USB 2.1 I might need to try more Android Phones or USB cables. 897420466

kafan1986 commented 4 years ago

@matkatz @RealSenseCustomerSupport At 15 fps with RGB at 1280x720 and Depth at 1280x720, the camera will throw lots of error and would eventually would stop producing frames, after few minutes. The only way I could make it work stable for longer duration was to set FPS at 6, at 6 Hz no error is thrown for a long time and I could stream RGB at rather highest resolution of 1920x1080 and Depth at 1280x720 simultaneously without crashes for longer period. After around 3-4 hours, I saw the depth frame was getting updated but somehow the RGB stream was stuck on some previous frame. Stats displayed 0 fps for RGB stream. I was able to resume the camera at same 1920x1080 resolution, without any restart or reset by simply going to the settings activity and then going back to preview activity.

Also FYIP, my device is USB 3.0, but the test app displays it as 3.2, not sure if it affects stability in any way. BTW, I am using latest 05.11.15.00 firmware and 2.30.0 SDK.

The error which was thrown after 3-4 hours was this:

2019-12-02 06:45:18.321 7396-7804/com.intel.realsense.camera E/librs: failed to submit UVC request, error: -11
2019-12-02 06:45:20.719 7396-7804/com.intel.realsense.camera E/librs: uvc streamer watchdog triggered on endpoint: 132

I really need this to work at 15 Hz stable on android. Do confirm whether solving this issue is high on your priority or not, someone is actively looking into this issue. I need to make some business decision regarding my product design components accordingly.

@rafaelspring Did you ever share your hacked libusb code to Matkatz, which did not face same "out of memory" issue. I saw a previous thread regarding the same.

RealSenseCustomerSupport commented 4 years ago

@GucciPrada As your connection type is USB 2.1, only 6fps is supported for 1280x720. If you want higher fps such as 15fps or 30fps, you need switch to USB3 connection.

@kafan1986 What's your android device when you get the issue with latest v2.30? And could you please provice the full logcat log when the issue happened? Thanks!