ZED Gstreamer Pipeline Error

Hello,

I just flashed our Jetson Orin with JP 6.2.1 and installed ZED SDK v5.0.7 and the ZED GStreamer Plugin.

I have four ZED X / ZED X Mini cameras connected to the device and all of them seem to be running without issues when using ZED Explorer.

When running the example GStreamer Pipeline

gst-launch-1.0 zedsrc camera-sn=<sn-of-camera> camera-resolution=5 camera-fps=60 stream-type=2 ! autovideoconvert ! queue ! fpsdisplaysink

The pipeline starts and I can see the image stream but after some time I run into the following error. Apparently as soon as the exposure gain is changed.

Setting pipeline to PAUSED ...
Setting depth_mode to NONE
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Grabbing failed with error: 'CORRUPTED FRAME' - The image may be corrupted or invalid
Additional debug info:
/home/nvidia/code/zed-gstreamer/gst-zed-src/gstzedsrc.cpp(2769): gst_zedsrc_fill (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0
Execution ended after 0:00:05.876584117
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Internal data stream error.
Setting pipeline to NULL ...
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0:
streaming stopped, reason error (-5)
Freeing pipeline ... 

Gain control error can be seen in dmesg

[ 1520.890650] sl_max9296 11-0048: fps_set_Dser: 105000000 is not a supported value. [30,60,120]*10^6 are supported.
[ 1520.896012] sl_max9296 11-0048: fps_set_Dser: 105000000 is not a supported value. [30,60,120]*10^6 are supported.
[ 1563.813055] sl_max9296 11-0048: fps_set_Dser: 105000000 is not a supported value. [30,60,120]*10^6 are supported.
[ 1563.825953] sl_max9296 11-0048: fps_set_Dser: 105000000 is not a supported value. [30,60,120]*10^6 are supported.
[ 1595.610742] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1595.618921] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.687365] zedx 11-0038: Error writing mode
[ 1595.734966] zedx 11-0030: Error writing mode
[ 1595.752718] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.753147] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.807444] zedx 11-0030: Error writing mode
[ 1595.808152] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.855077] zedx 11-0030: Error writing mode
[ 1595.864472] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.911141] zedx 11-0030: Error writing mode
[ 1595.959277] zedx 11-0030: Error writing mode
[ 1595.965621] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1595.966405] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1596.015310] zedx 11-0038: Error writing mode
[ 1596.015905] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1596.063340] zedx 11-0038: Error writing mode
[ 1596.072644] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1596.123286] zedx 11-0038: Error writing mode
[ 1596.171318] zedx 11-0038: Error writing mode

This occasionally also leads to having to restart the ZED X deamon service as the camera changes to NOT AVAILABLE. I also appended the whole dmesg log. Sometimes it’s also possible to restart the pipeline without having to restart the deamon service but the pipeline always stops as soon as i change the lighting conditions of the image.

This issue occures with any of the cameras. Sometimes the error also causes issues that cannot be solved by restarting the ZED deamon service.

Setting pipeline to PAUSED ...
Setting depth_mode to NONE
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)

I then get this error if I try to run the pipeline with any of the cameras. Trying to run the pipeline then sets the camera to NOT AVAILABLE.

We seem to have had this issue with ZED GStreamer also for JP 6.0 where it caused our system to run rather instable.

I would appreciate some support on this topic. Out application relies on stable RTSP streams and this currently does not seem to be achievable using our ZED cameras.

dmesg.txt (132.8 KB)

EDIT: it seems like when switching between cameras in ZED_Explorer I occasionally also run into ā€œnvbuf_utils: dmabuf_fd -1 mapped entry NOT foundā€ errors.

 

This is not a valid resolution for the ZED X cameras:

  camera-resolution   : Camera Resolution
                        flags: readable, writable
                        Enum "GstZedSrcRes" Default: 6, "Default value for the camera model"
                           (0): HD2K (USB3)      - 2208x1242
                           (1): HD1080 (USB3/GMSL2) - 1920x1080
                           (2): HD1200 (GMSL2)   - 1920x1200
                           (3): HD720 (USB3)     - 1280x720
                           (4): SVGA (GMSL2)     - 960x600
                           (5): VGA (USB3)       - 672x376
                           (6): Default value for the camera model - Automatic

You can use only 1, 2, 4, 6

I also recommend you upgrade the ZED X Driver to the latet v1.3.1

Thanks for the quick response and and the hint regarding the invalid camera resolution. This is now fixed and no more GAIN control error seems to be occurring.

Still I’m running into CORRUPTED FRAME errors

gst-launch-1.0 zedsrc camera-sn=<my-camera-sn> camera-resolution=2 camera-fps=30 stream-type=1 ! autovideoconvert ! queue ! fpsdisplaysink
Setting pipeline to PAUSED ...
Setting depth_mode to NONE
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Grabbing failed with error: 'CORRUPTED FRAME' - The image may be corrupted or invalid
Additional debug info:
/home/nvidia/code/zed-gstreamer/gst-zed-src/gstzedsrc.cpp(2769): gst_zedsrc_fill (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Internal data stream error.
Execution ended after 0:00:00.877249009
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0:
streaming stopped, reason error (-5)
Setting pipeline to NULL ...
Freeing pipeline ...

Regarding the ZED X Driver - v1.3.0 seems to be the latest version currently provided by Syslogic for their Jetson boards.

Besides the GStreamer issue there is still the ā€œnvbuf_utils: dmabuf_fd -1 mapped entry NOT foundā€ errors also happenening when runnnig ZED Explorer.

./ZED_Explorer 
 ** [SVO] Hardware compression (NVENC) available **
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)
(Argus) Error FileOperationFailed: Failed socket read: Connection reset by peer (in src/rpc/socket/common/SocketUtils.cpp, function readSocket(), line 79)
(Argus) Error FileOperationFailed: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 277)
(Argus) Error FileOperationFailed: Receive worker failure, notifying 2 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 350)
(Argus) Error InvalidState: Argus client is exiting with 2 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)
(Argus) Error FileOperationFailed: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 379)
(Argus) Error FileOperationFailed: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error FileOperationFailed:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 265)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)

And further causing

./ZED_Explorer --all
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 220)
(Argus) Error Timeout: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 107)
No ZED detected

See also dmesg

dmesg.txt (130.3 KB)

If ZED Explorer and ZED Depth Viewer are not working, then the problem is not related to GStreamer.

Are you using a Syslogic ECU? This is important information to share when reporting the problem.
Please contact Syslogic to get support for their devices.

Thank you! I already contacted Syslogic regarding these issues and the latest version of the driver.

Still I’m wondering where these ā€˜CORRUPTED FRAME’ issues come from, as this seems to be an error happening inside the zedsrc plugin itself.

gst-launch-1.0 zedsrc camera-sn=59756691 camera-resolution=2 camera-fps=60 stream-type=1 ! autovideoconvert ! queue ! fpsdisplaysink video-sink=fakesink text-overlay=false
Setting pipeline to PAUSED ...
Setting depth_mode to NONE
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Grabbing failed with error: 'CORRUPTED FRAME' - The image may be corrupted or invalid
Additional debug info:
/home/nvidia/code/zed-gstreamer/gst-zed-src/gstzedsrc.cpp(2769): gst_zedsrc_fill (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0
Execution ended after 0:00:01.798888637
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0:
streaming stopped, reason error (-5)
Freeing pipeline ...

It only occures when i move the cameras and cables around, so some faulty cable connection or hardware issues seem to occure - but at the same time it is reproducable with all of the ZED X / ZED X Mini cameras and GMSL cables we have.

I can also restart the streams and no new kernel messages indicating any errors are written to dmesg. Is there some option on how to ā€œomit-corrupted-framesā€ to not have to manually restart the pipeline?

I further tested the cameras with the ROS 2 wrapper (already with SDK v5.1) and same moving around of cameras and cables doesn’t seem to cause any issues.

For SDK v5.1 zedsrc doesn’t seem to work anymore. I guess this version is still not supported?

Some of the previously occuring errors seem to have been caused by loose GSML2 Fakra connectors. After re-seating them and making sure all cameras are tightly connected, e.g. the multi-sender streaming python example (zed-sdk/camera streaming/multi_sender/python/streaming_senders.py at master Ā· stereolabs/zed-sdk Ā· GitHub) now works without any of the previous issues.

I also updated the driver to v1.3.2 and I’m still encountering ā€˜CORRUPTED FRAME’ errors when running the Gstreamer pipeline.

gst-launch-1.0 zedsrc camera-sn=<camera-sn> camera-resolution=2 camera-fps=60 stream-type=1 ! autovideoconvert ! queue ! fpsdisplaysink video-sink=fakesink text-overlay=false
Setting pipeline to PAUSED ...
Setting depth_mode to NONE
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Grabbing failed with error: 'CORRUPTED FRAME' - The image may be corrupted or invalid
Additional debug info:
/home/nvidia/code/zed-gstreamer/gst-zed-src/gstzedsrc.cpp(2769): gst_zedsrc_fill (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0
Execution ended after 0:00:16.936325604
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0:
streaming stopped, reason error (-5)
Freeing pipeline ...

This apparently only happens when the camera frame is repeatedly occuluded or the lighting conditions change drastically. Neither camera nor cable are moved or touched when triggering this error so this doesn’t seem to be a hardware connection issue anymore.

Hi @nweg,

The CORRUPTED FRAME error code is a warning that is returned when the difference between left and right image is too great, e.g. from a capture issue, leading to a reduced quality depth information.

As the issue is not considered critical, the application is not required to exit for this error code. We have updated the gstreamer plugin to reflect this, please find the fix on the master branch of the repository: GitHub - stereolabs/zed-gstreamer: Package of GStreamer elements to interface with ZED Cameras

1 Like