Argus camera crashing issue on missing camera

I am using Argus camera-api to develop a camera application. The application is working fine with correct configurations , but application crashes when a camera index is given as input with no actual camera device connected to the port.

Scenario: The csi-port 3 is given as input but no camera is connected to the port. I was expecting an error or an exception but the timeout error happens and the application becomes stuck.
After the crash the board needs to be powered down and rebooted to get it back to working condition.

Log snippet from crash:

(NvCamV4l2) Error IoctlFailed:  (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function setControlValMultiple(), line 792)
(NvOdmDevice) Error IoctlFailed:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1901)
updateOutputSettings: Set Control failed. Use cached values
(NvCamV4l2) Error IoctlFailed:  (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function setControlValMultiple(), line 792)
(NvOdmDevice) Error IoctlFailed:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function setDeviceControls(), line 1901)
updateOutputSettings: Set Control failed. Use cached values
SCF: Error InvalidState: 2 buffers still pending during EGLStreamProducer destruction (propagating from src/services/gl/EGLStreamProducer.cpp, function freeBuffers(), line 306)
SCF: Error InvalidState:  (propagating from src/services/gl/EGLStreamProducer.cpp, function ~EGLStreamProducer(), line 50)
waitForIdleLocked remaining request 103 
waitForIdleLocked remaining request 102 
waitForIdleLocked remaining request 101 
SCF: Error Timeout: waitForIdle() timed out (in src/api/Session.cpp, function waitForIdleLocked(), line 922)
(Argus) Error Timeout:  (propagating from src/api/CaptureSessionImpl.cpp, function destroy(), line 166)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc

Is this a known issue/limitation and how can this be avoided ?

You may need restart nvargus-daemon to recovery it.

sudo service nvargus-daemon restart

Thank you @ShaneCCC for the replay.

Is this a known issue, and if so how can it be handled with the camera application.?

Is there no way to detect if a camera is actually connected to the board or not?

The sensor driver should be able abort to register the video node in probe function if didn’t connect.

But the abort is not happening and the application gets stuck at

(Argus) Error Timeout:  (propagating from src/api/CaptureSessionImpl.cpp, function destroy(), line 166)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)

After this the board needs to be powered down and rebooted to get it back to working condition.

I mean you should modify the sensor driver don’t generate the /dev/video# if the sensor didn’t connect.
And without generate the /dev/video# the Argus should be abort before timeout.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.