Hi Jerry,
I tried the updated library, but no success. The following information is output by ARGUS. Note that this is only an example, different detailed CSI/VI error codes may be printed depending on where the exact CSI-2 error is.
Note again that we expect such errors to happen from time to time because the image data is transmitted through a very long serial cable in noisy environments where transmission failures do occur.
NvViErrorDecode Stream 2.1 failed: ts 59260703159168 frame 66 error 2 data 0x000000a2
NvViErrorDecode CaptureError: CsimuxFrameError (2)
NvViErrorDecode See https://wiki.nvidia.com/wmpwiki/index.php/Camera_Debugging/CaptureError_debugging for more information and links to documents.
CsimuxFrameError_Regular : 0x000000a2
Stream ID [ 2: 0]: 2
VPR state from fuse block [ 3]: 0
Frame end (FE) [ 5]: 1
A frame end has been found on a regular mode stream.
FS_FAULT [ 7]: 1
A FS packet was found for a virtual channel that was already in frame. An errored FE packet was injected before FS was allowed through.
SCF: Error Timeout: (propagating from src/services/capture/CaptureServiceDevice.cpp, function issueCaptures(), line 1130)
SCF: Error Timeout: (propagating from src/common/Utils.cpp, function workerThread(), line 116)
SCF: Error Timeout: Worker thread CaptureScheduler frameStart failed (in src/common/Utils.cpp, function workerThread(), line 133)
SCF: Error BadValue: timestamp cannot be 0 (in src/services/capture/NvViCsiHw.cpp, function waitCsiFrameEnd(), line 711)
SCF: Error BadValue: (propagating from src/common/Utils.cpp, function workerThread(), line 116)
SCF: Error BadValue: Worker thread ViCsiHw frameComplete failed (in src/common/Utils.cpp, function workerThread(), line 133)
captureErrorCallback Stream 2.1 capture 2402 failed: ts 59260703159168 frame 66 error 2 data 0x000000a2
SCF: Error Timeout: (propagating from src/api/Buffer.cpp, function waitForUnlock(), line 637)
SCF: Error Timeout: (propagating from src/components/CaptureContainerImpl.cpp, function returnBuffer(), line 358)
SCF: Error InvalidState: Capture Scheduler not running (in src/services/capture/CaptureServiceDevice.cpp, function addNewItemToSchedule(), line 908)
SCF: Error InvalidState: (propagating from src/services/capture/CaptureService.cpp, function addRequest(), line 395)
SCF: Error InvalidState: (propagating from src/components/stages/MemoryToISPCaptureStage.cpp, function doHandleRequest(), line 137)
SCF: Error InvalidState: (propagating from src/components/stages/OrderedStage.cpp, function doExecute(), line 158)
SCF: Error InvalidState: Sending critical error event (in src/api/Session.cpp, function sendErrorEvent(), line 990)
SCF: Error InvalidState: Capture Scheduler not running (in src/services/capture/CaptureServiceDevice.cpp, function addNewItemToSchedule(), line 908)
SCF: Error InvalidState: (propagating from src/services/capture/CaptureService.cpp, function addRequest(), line 395)
SCF: Error InvalidState: (propagating from src/components/stages/SensorCaptureStage.cpp, function doHandleRequest(), line 87)
SCF: Error InvalidState: (propagating from src/components/stages/OrderedStage.cpp, function doExecute(), line 158)
SCF: Error InvalidState: Sending critical error event (in src/api/Session.cpp, function sendErrorEvent(), line 990)
The application receives the error for the stream and tries to stop all captures:
iCaptureSession->stopRepeat();
iCaptureSession->cancelRequests();
iCaptureSession->waitForIdle();
The waitForIdle() call does not succeed for any of the captures. It block infinitely.
When the call to waitForIdle() is deleted and capture session teardown is simply continued:
<delete FrameConsumer object>
<delete Request object>
<delete EGLOutputStream object>
<delete CaptureSession object>
ARGUS hangs infinitely at the point where the CaptureSession is deleted, for every active capture session.
Since the capture sessions are not deleted and the hardware is not released, it is impossible to restart any capture. The application needs to stop itself via calling the C function exit(). Only then do I see kernel messages about the V4L devices being stopped and the image sensors being shut down.