[HailoRT] [error] CHECK failed - src size must be 1228800. passed size - 0

Dear Community,
I’m trying to use hailo8 with ubuntu22. My hailoRT version is 4.17.0.
I changed some code of the example of gstreamer/multistream_lpr to replace the filesrc to rtsp source. Also use yolov8m instead of the car detection hef.

The error output likes this:
“Redistribute latency…
Redistribute latency…
Redistribute latency…
[HailoRT] [error] CHECK failed - src size must be 1228800. passed size - 0
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_ARGUMENT(2)
[HailoRT] [error] Non-recoverable Async Infer Pipeline error. status error code: HAILO_INVALID_ARGUMENT(2)
[HailoRT] [error] Shutting down the pipeline with status HAILO_INVALID_ARGUMENT(2)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_ARGUMENT(2) - Can’t handle infer request since Pipeline status is HAILO_INVALID_ARGUMENT(2).
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_ARGUMENT(2)
CHECK_EXPECTED_AS_STATUS failed with status=2
CHECK_SUCCESS failed with status=2
^Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:05:11.047721484
Setting pipeline to NULL …”

Since the error come from HailoRT, so I create it under hailort.
Now I paste the pipeline which can reproduce this issue:
gst-launch-1.0 rtspsrc location=rtsp://192.168.5.151/stream2 name=source_0 message-forward=true ! rtph264depay ! hailofilter name=set_id_0 so-path=/home/cupcake/tappas/apps/h8/gstreamer/libs/post_processes//libstream_id_tool.so config-path=CAM_0 qos=false ! queue name=pre_decode_qtdemux_q_0 leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! decodebin ! queue name=pre_postproc_q_0 leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! videoconvert qos=false ! video/x-raw,format=RGB,pixel-aspect-ratio=1/1 ! queue name=hailo_prestream_mux_q_0 leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! fun.sink_0 rtspsrc location=rtsp://192.168.5.153/stream2 name=source_1 message-forward=true ! rtph264depay ! hailofilter name=set_id_1 so-path=/home/cupcake/tappas/apps/h8/gstreamer/libs/post_processes//libstream_id_tool.so config-path=CAM_1 qos=false ! queue name=pre_decode_qtdemux_q_1 leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! decodebin ! queue name=pre_postproc_q_1 leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! videoconvert qos=false ! video/x-raw,format=RGB,pixel-aspect-ratio=1/1 ! queue name=hailo_prestream_mux_q_1 leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! fun.sink_1 hailoroundrobin name=fun ! queue leaky=no max-size-bytes=0 max-size-time=0 name=hailo_pre_infer_q_0 max-size-buffers=10 ! hailocropper so-path=/home/cupcake/tappas/apps/h8/gstreamer/libs/post_processes//cropping_algorithms/libwhole_buffer.so use-letterbox=false function-name=create_crops internal-offset=true name=car_detect_cropper hailoaggregator name=car_detect_agg car_detect_cropper.src_0 ! queue name=car_detect_q leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! car_detect_agg.sink_0 car_detect_cropper.src_1 ! queue name=hailo_car_detect_q leaky=no max-size-buffers=15 max-size-bytes=0 max-size-time=0 ! videoscale n-threads=4 method=0 add-borders=false qos=false ! video/x-raw,width=640,height=640,pixel-aspect-ratio=1/1 ! queue leaky=no max-size-bytes=0 max-size-time=0 name=car_det_format_q3 max-size-buffers=13 ! hailonet hef-path=/home/cupcake/tappas/apps/h8/gstreamer/resources/hef/yolov8m.hef nms-score-threshold=0.3 nms-iou-threshold=0.45 output-format-type=HAILO_FORMAT_TYPE_FLOAT32 ! queue name=hailo_post_q leaky=no max-size-buffers=13 max-size-bytes=0 max-size-time=0 ! hailofilter function-name=yolov8m so-path=/home/cupcake/tappas/apps/h8/gstreamer/libs/post_processes//libyolo_hailortpp_post.so qos=false ! queue name=hailo_remap_q leaky=no max-size-buffers=13 max-size-bytes=0 max-size-time=0 ! car_detect_agg.sink_1 car_detect_agg. ! identity name=fps_probe ! fakesink name=license_plate_ocr_sink sync=false async=false qos=false

If only use one rtsp source, there will be no problem.
If I remove “hailonet hef-path=/home/cupcake/tappas/apps/h8/gstreamer/resources/hef/yolov8m.hef nms-score-threshold=0.3 nms-iou-threshold=0.45 output-format-type=HAILO_FORMAT_TYPE_FLOAT32”, The pipeline will also be OK.
I also changed the yolov8m to yolov5m_wo_spp_60p, problem exists.

So I’m wondering if you know how to solve the problem? Is it a bug for hailort?

1 Like

Hi @chrysler.chen,
This error indicates that you are sending an empty data buffer into the device. So, either you have an issue with getting the images from the camera or an issue in sending it to the device.

Regards,

Hi Omer,

Thank you very much for your reply.
I searched the error from libhailort:
"hailo_status InputTransformContext::transform(const MemoryView src, MemoryView dst)
{
/* Check sizes */
CHECK(src.size() == m_src_frame_size, HAILO_INVALID_ARGUMENT,
“src size must be {}. passed size - {}”, m_src_frame_size, src.size());
CHECK(dst.size() == m_dst_frame_size, HAILO_INVALID_ARGUMENT,
“dst_size must be {}. passed size - {}”, m_dst_frame_size, dst.size());

hailo_status status = transform_inner(src.data(),
    quant_buffer().data(), dst.data(), transpose_buffer());
CHECK_SUCCESS(status);
return HAILO_SUCCESS;

}"
Here the code checks the src and dst, but unfortunately, src.size() is 0.
This indicates that something is missing. But I wonder if the CHECK can be changed to something to return HAILO_FAIL, and don’t block the whole pipeline?
From the gstreamer pipeline, the two rtsp sources first go through a decodebin, and then merged togther by HailoRoundBin, then a HailoCropper divide the pipeline to to branches, then one branch goes to HailoNet. HailoNet reports this error but it’s hard for me to find out why the src size is 0.
I will try to use other rtsp sources instead of cameras to check if the error will still occur, and if yes, I will change the source back to mp4 video to check again.

Best Regards.

Hi @chrysler.chen,
The pipeline blocking is a feature, and is done because if that part fails, there’s no point in continuing the pipeline as you’ll either get another exception later on or the result would be totally incorrect.

Regards,

Hi Omer,
Thanks. Yes, you are correct. But I’m wondering why this would happen and how should I fix it.
I have finished the testing using two mp4 file sources with 10 minutes duration. The error doesn’t occur. Now I’m trying to change a little to the pipeline to find out which element or parameter might cause the problem.
Thank you very much.

Best Regards.

1 Like

Hi community,

After I compare the pipelines, I find I comment one queue might cause this problem. After I add the queue again, the problem seems disappear.
The queue is :""queue name=pre_lpd_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! ", add this before the last “fakesink name=license_plate_…”

It can run a few hours, but another prblem occur:
Gstreamer-Video-CRITICAL **: xxxxx: gst_video_frame_map_id: assertion ‘info->finfo->format == meta->format’ failed gst_video_frame_map failed!. I will post this to a new topic.

2 Likes