Need Help RGBCamera Crashed

I am trying to run RGB Camera demo, but app crashes with following logcat message.
Of course, the power saving mode is turned off.

Sony Xperia 5 II XQ-AS72
Nebula universal version 2.01.00.1
Nreal Light (Commercial version) Firmware: 05.1.07.009_20201026_0036
NRSDK v1.6.0
Unity 2020.3.13f1

adb logcat message
08-03 22:49:50.659 3006 3111 I Unity : [Info][CameraController] Start to play, result:True
08-03 22:49:50.659 3006 3111 I Unity : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
08-03 22:49:50.659 3006 3111 I Unity : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
08-03 22:49:50.659 3006 3111 I Unity : UnityEngine.Logger:Log (UnityEngine.LogType,object)
08-03 22:49:50.659 3006 3111 I Unity : UnityEngine.Debug:Log (object)
08-03 22:49:50.659 3006 3111 I Unity : NRKernal.DefaultLogHelper:Log (NRKernal.LogLevel,object) (at C:/Users/tmoto/VRWORK/NRSDK2Sample/Assets/NRSDK/Scripts/NRDebugger.cs:58)
08-03 22:49:50.659 3006 3111 I Unity : NRKernal.NRDebugger:Info (string) (at C:/Users/tmoto/VRWORK/NRSDK2Sample/Assets/NRSDK/Scripts/NRDebugger.cs:224)
08-03 22:49:50.659 3006 3111 I Unity : NRKernal.NativeCameraProxy:b__27_0 () (at C:/Users/tmoto/VRWORK/NRSDK2Sample/Assets/NRSDK/Scripts/Camera/Proxy/NativeCameraProxy.cs:242)
08-03 22:49:50.659 3006 3111 I Unity : NRKernal.AsyncTaskExecuter:RunAsyncTask () (at C:/Users/tmoto/VRWORK/NRSDK2Sample/Assets/NRSDK/Scripts/Utility/AsyncTaskExecuter.cs:44)
08-03 22:49:50.659 3006 3111 I Unity : System.Threading.ThreadHelper:ThreadStart_Context (object)
08-03 22:49:50.659 3006 3111 I Unity : System.Threading.ExecutionContext:RunInternal (System.Threading.Executio
08-03 22:49:50.661 3006 3105 I NREAL : [2021-08-03 22:49:50.661] [INFO] [NRSDK] NRRGBCamera START!
08-03 22:49:50.665 3006 3237 W NREAL : [2021-08-03 22:49:50.664] [WARN] [NRSensor] Log Info: pid:3006, time:2021-08-03 22:49:50 (+0900)
08-03 22:49:50.665 3006 3237 I NREAL : [2021-08-03 22:49:50.664] [INFO] [NRSensor] RGB Camera initializing
08-03 22:49:50.696 1667 2324 I EventHub: Removing device USB Camera: nreal light RGB cam due to epoll hang-up event.
08-03 22:49:50.696 1667 2324 I EventHub: Removed device: path=/dev/input/event10 name=USB Camera: nreal light RGB cam id=179 fd=420 classes=0x80000001
08-03 22:49:50.698 1100 2268 I ExtCamProvider@2.6: ExtCam: removing /dev/video2 from External Camera HAL!
08-03 22:49:50.698 1327 2274 I CameraProviderManager: Camera device device@3.4/external//dev/video2 status is now NOT_PRESENT, was PRESENT
08-03 22:49:50.698 1327 2274 I CameraService: onDeviceStatusChanged: Status changed for cameraId=/dev/video2, newStatus=0
08-03 22:49:50.698 1327 2274 W CameraService: removeClientLocked: Could not evict client, no client for camera ID /dev/video2
08-03 22:49:50.698 1327 2274 W CameraService: removeClientLocked: Could not evict client, no client for camera ID offline-/dev/video2
08-03 22:49:50.698 1327 2274 W CameraFlashlight: hasFlashUnitLocked: camera /dev/video2 not present when findFlashUnits() was called
08-03 22:49:50.699 3006 3237 I NREAL : [2021-08-03 22:49:50.699] [INFO] [NRSensor] RGB Camera got false handle, work type = 0
08-03 22:49:50.699 3006 3237 I NREAL : [2021-08-03 22:49:50.699] [INFO] [NRSensor] RGB Camera protocol 0 MATCHED

I’m enable to see where’s the problem from the log.

But still, make sure that both storage and microphone permissions are enabled in the app on your phone.

Thank you for your help.
There are two permissions ‘Camera’ and ‘Files and media’ in the app.
I have enabled all permissions, still same errors.

Which demo exactly? There are 4.

The demo program that I am trying is “RGBCamera”.

Please try the other 3 demos too.

I tried another 3 demos and they all crashed, too.
I wonder the RGB camera might have malfunctioned, but when I connected it to my PC, it was working fine.

Ok I think we got something. You mentioned that the app only shows 2 permissions, camera and storage. There’s a missing permission for the microphone. The new SDK 1.6 added sound record through mic with the RGB camera. The instructions in the script shows that you have to manually add the permission to the app’s androidmanifest.xml file.

Go to the assets/plugin/android

You’ll find the androidmanifest file

Add the following permission

uses-permission android:name=“android.permission.RECORD_AUDIO”

Basically just copy paste one of the existing ones and chang the name :yum:

When you build and install the app, go to the permissions and it should be there.

1 Like

Unfortunately, the app still crashes with following logcat:
08-06 21:47:00.374 17656 17746 I Unity : [Info][CameraController] Start to play, result:True
08-06 21:47:00.374 17656 17746 I Unity : UnityEngine.StackTraceUtility:ExtractStackTrace () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/StackTrace.cs:37)
08-06 21:47:00.374 17656 17746 I Unity : UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
08-06 21:47:00.374 17656 17746 I Unity : UnityEngine.Logger:Log (UnityEngine.LogType,object)
08-06 21:47:00.374 17656 17746 I Unity : UnityEngine.Debug:Log (object)
08-06 21:47:00.374 17656 17746 I Unity : NRKernal.DefaultLogHelper:Log (NRKernal.LogLevel,object) (at C:/Users/tmoto/VRWORK/NRSDK2Sample/Assets/NRSDK/Scripts/NRDebugger.cs:58)
08-06 21:47:00.374 17656 17746 I Unity : NRKernal.NRDebugger:Info (string) (at C:/Users/tmoto/VRWORK/NRSDK2Sample/Assets/NRSDK/Scripts/NRDebugger.cs:224)
08-06 21:47:00.374 17656 17746 I Unity : NRKernal.NativeCameraProxy:b__27_0 () (at C:/Users/tmoto/VRWORK/NRSDK2Sample/Assets/NRSDK/Scripts/Camera/Proxy/NativeCameraProxy.cs:242)
08-06 21:47:00.374 17656 17746 I Unity : NRKernal.AsyncTaskExecuter:RunAsyncTask () (at C:/Users/tmoto/VRWORK/NRSDK2Sample/Assets/NRSDK/Scripts/Utility/AsyncTaskExecuter.cs:44)
08-06 21:47:00.374 17656 17746 I Unity : System.Threading.ThreadHelper:ThreadStart_Context (object)
08-06 21:47:00.374 17656 17746 I Unity : System.Threading.ExecutionContext:RunInternal (System.Threading.Executio
08-06 21:47:00.376 17656 17741 I NREAL : [2021-08-06 21:47:00.376] [INFO] [NRSDK] NRRGBCamera START!
08-06 21:47:00.380 17656 17802 W NREAL : [2021-08-06 21:47:00.380] [WARN] [NRSensor] Log Info: pid:17656, time:2021-08-06 21:47:00 (+0900)
08-06 21:47:00.383 17656 17802 I NREAL : [2021-08-06 21:47:00.380] [INFO] [NRSensor] RGB Camera initializing
08-06 21:47:00.402 1076 3162 I ExtCamProvider@2.6: ExtCam: removing /dev/video2 from External Camera HAL!
08-06 21:47:00.402 1307 1522 I CameraProviderManager: Camera device device@3.4/external//dev/video2 status is now NOT_PRESENT, was PRESENT
08-06 21:47:00.402 1638 1817 I EventHub: Removing device USB Camera: nreal light RGB cam due to epoll hang-up event.
08-06 21:47:00.402 1638 1817 I EventHub: Removed device: path=/dev/input/event10 name=USB Camera: nreal light RGB cam id=10 fd=411 classes=0x80000001
08-06 21:47:00.403 1638 1817 I InputReader: Device removed: id=10, eventHubId=10, name=‘USB Camera: nreal light RGB cam’, descriptor=‘e8e76778fa18f67d607397d3a1d277210f36d281’, sources=0x00000101
08-06 21:47:00.403 1638 1817 I EventHub: Removing device ‘/dev/input/event10’ due to inotify event
08-06 21:47:00.403 1307 1522 I CameraService: onDeviceStatusChanged: Status changed for cameraId=/dev/video2, newStatus=0
08-06 21:47:00.403 1307 1522 W CameraService: removeClientLocked: Could not evict client, no client for camera ID /dev/video2
08-06 21:47:00.403 1307 1522 W CameraService: removeClientLocked: Could not evict client, no client for camera ID offline-/dev/video2
08-06 21:47:00.403 1307 1522 W CameraFlashlight: hasFlashUnitLocked: camera /dev/video2 not present when findFlashUnits() was called
08-06 21:47:00.404 989 1114 D audio_hw_primary: adev_set_parameters: enter: camera_off=/dev/video2
08-06 21:47:00.404 989 1114 D audio_hw_hfp: hfp_set_parameters: enter
08-06 21:47:00.404 989 1114 D audio_hw_extn: audio_extn_fm_set_parameters: Enter
08-06 21:47:00.405 1307 2194 E CameraService: supportsCameraApi: Unknown camera ID /dev/video2
08-06 21:47:00.406 1076 3162 I ExtCamProvider@2.6: ExtCam: removing /dev/video3 from External Camera HAL!
08-06 21:47:00.406 1076 3162 E ExtCamProvider@2.6: deviceRemoved: cannot find camera device /dev/video3
08-06 21:47:00.406 2923 2923 D TransmitPower: CameraObserver(32):sendCameraStatus(): Error = java.lang.IllegalArgumentException: supportsCameraApi:2342: Unknown camera ID /dev/video2
08-06 21:47:00.407 1307 2194 E CameraService: supportsCameraApi: Unknown camera ID /dev/video2
08-06 21:47:00.408 2923 2923 D TransmitPower: CameraObserver(64):sendCameraStatus(): Error = java.lang.IllegalArgumentException: supportsCameraApi:2342: Unknown camera ID /dev/video2
08-06 21:47:00.411 16577 16577 I GlassSdkManager: sdk callback onPermission: rgb =true
08-06 21:47:00.411 1638 2220 D UsbHostManager: Removed device at /dev/bus/usb/002/002: USB Camera
08-06 21:47:00.411 1638 2220 I UsbAlsaManager: USB Audio Device Removed: null
08-06 21:47:00.412 1638 2220 W UsbVCInterface: Unknown Video Class Interface subtype: 0x7
08-06 21:47:00.412 1638 2220 I chatty : uid=1000(system) UsbService host identical 9 lines
08-06 21:47:00.412 1638 2220 W UsbVCInterface: Unknown Video Class Interface subtype: 0x7
08-06 21:47:00.412 1638 2220 W UsbVCInterface: Unknown Video Class Interface subtype: 0xd
08-06 21:47:00.412 1638 2220 W UsbVCInterface: Unknown Video Class Interface subtype: 0xd
08-06 21:47:00.413 1638 1638 I PowerSaveModule: onCameraUnavailable : Not support non numeric camera ID(Removable camera ID): /dev/video2
08-06 21:47:00.413 17656 17741 E NREAL : [2021-08-06 21:47:00.413] [ERROR] [NRSDK] Plugin Start failed: retcode=1, id=nr_rgb_camera_id, Unload plugin!
08-06 21:47:00.413 17656 17741 I NREAL : [2021-08-06 21:47:00.413] [INFO] [NRSDK] NRRGBCamera RUN!
08-06 21:47:00.414 16577 16577 W Glasses.api: rgb plug out
08-06 21:47:00.415 17656 17741 E NREAL : [2021-08-06 21:47:00.414] [ERROR] [NRSDK] start rgb camera fail false
08-06 21:47:00.416 2923 4645 D TransmitPower: TransmitPowerService:setPowerBackOffFactor() : key = 128, value = 0
08-06 21:47:00.416 3142 3142 D QcrilMsgTunnelIfaceManager: handleMessage what = 1
08-06 21:47:00.416 3142 3142 I QcrilOemhookMsgTunnel: [0]invokeOemRilRequestRaw: serial=1042 length=24
08-06 21:47:00.417 17656 17802 I NREAL : [2021-08-06 21:47:00.410] [INFO] [NRSensor] RGB Camera got false handle, work type = 0
08-06 21:47:00.417 17656 17802 I NREAL : [2021-08-06 21:47:00.411] [INFO] [NRSensor] RGB Camera protocol 0 MATCHED
08-06 21:47:00.417 17656 17802 I NREAL : [2021-08-06 21:47:00.413] [INFO] [NRSensor] RGB Camera protocol load SUCCESS
08-06 21:47:00.417 17656 17802 I NREAL : [2021-08-06 21:47:00.413] [INFO] [NRSensor] RGB Camera initialized
08-06 21:47:00.417 17656 17802 I NREAL : [2021-08-06 21:47:00.413] [INFO] [NRSensor] RGB Camera starting
08-06 21:47:00.417 17656 17802 F NREAL : [2021-08-06 21:47:00.413] [FATAL] [NRSensor] Generic Camera find device : No such device (-4)
08-06 21:47:00.418 17656 17802 E NREAL : [2021-08-06 21:47:00.413] [ERROR] [NRSensor] Generic Camera start failed

Sorry for delayed reply. (SIMフリー) ソニー Sony Xperia 5 II 5G XQ-AS72 デュアルSIM 256GB ブラック(8GB RAM)通販なら | Etoren Japan
This is sim free model of xperia5-ii, it is out of support on nreal light, only kddi model has supported.
Xperia 5-ii: only KDDI
Xperia 1-iii: only KDDI
Xperia 5-iii: VF and KDDI (later)

I am Japanese. I also could not run the RGBCamera-Record demo on a Xperia 1-ii which is sim-free device (did not buy from KDDI). I got “RGB camera is diabled” message dialogue when tapping the start button in the app. Although I have not checked adb logcat, it seems to be the same issue. On the other hand, I can run the demo app with no problem on a Xperia 5-ii (not 1-ii, sorry) which is bought from KDDI.
FYI.