JPEG decoder crashes

We are using Jetson Xavier NX hardware decoder to decode image stream (running at 10fps). Image resolution is 1920x1200. The decoder crashes with Segmentation Fault randomly. Upon debugging with gdb, we found that it’s crashes at this function NvVideoJPEGDecoderPinYUVSurface ()

GDB log:

Program terminated with signal SIGSEGV, Segmentation fault.                                                                                                                                                
#0  0x0000ffffac0b38ec in NvVideoJPEGDecoderPinYUVSurface () from /usr/lib/aarch64-linux-gnu/tegra/                                                                                           
[Current thread is 1 (LWP 10963)]                                                                                                                                                                          
(gdb) up                                                                                                                                                                                                   
#1  0x0000ffffae061a6c in NvMediaIJPDRenderYUV () from /usr/lib/aarch64-linux-gnu/tegra/                                                                                                      
(gdb) up                                                                                                                                                                                                   
#2  0x0000ffffb11c8900 in jpegTegraDecoderRender () from /usr/lib/aarch64-linux-gnu/tegra/                                                                                                     
#3  0x0000ffffb11a2a88 in jpeg_read_raw_data () from /usr/lib/aarch64-linux-gnu/tegra/                                                                                                         
#4  0x0000aaaab4900c74 in NvJPEGDecoder::decodeToFd (this=0xaaaaf3cfcf80, fd=@0xaaaaf3caeaf0: 73, in_buf=0xffff6824a010 "\377\330\377", <incomplete sequence \333>, in_buf_size=232901,                    
    pixfmt=@0xffff1a72d62c: 43690, width=@0xffff1a72d624: 65535, height=@0xffff1a72d628: 4090942640) at /usr/src/jetson_multimedia_api/samples/common/classes/NvJpegDecoder.cpp:135                        
135             jpeg_read_raw_data (&cinfo, NULL, cinfo.comp_info[0].v_samp_factor * DCTSIZE); 

Details on the SW:

  1. JP 5.1
  2. JPEG decoder is used in a Qt app and the decoded image is displayed in the app
  3. Single threaded decoding loop
  4. Incoming JPEG stream is from another NX (using NX’s HW encoder) over ethernet and with ROS.

Please try 06_jpeg_decode sample and see if you can reproduce the issue. If yes, please share the command.

Also latest release is Jetpack 5.1.1. It would be great if you can upgrade and try.

@DaneLLL ,

this happens randomly with live camera feed coming from MIPI Image sensor (Also, Have noticed that when the image changes drastically, this issue is more likely to happen). Do you still think the standalone example testing would be helpful? If yes, I can try.

We have tested our product with JP5.1. We cannot change to JP5.1.1 as it requires more hours of testing.

For further software debugging, we would need to replicate the issue first. Please try 06_jpeg_decode or 12_camera_v4l2_cuda sample and see if you can observe the issue.

Hi @DaneLLL ,

OK. Will test and get back to you.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.

Is this still an issue to support? Any result can be shared? Thanks