This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

J722SXH01EVM: app_multi_cam_codec crashes at runtime in sdk 11.0

Part Number: J722SXH01EVM


Tool/software:

Hi,

We have found when running app_multicam_codec with a single cam input on 11.0 (encode enabled, decode disabled), the program crashes before it can finish processing a single frame.

it successfully creates & verifies the graph, and crashes when enqueuing the frame buffer inside the function `capture_encode()` at the line:

`status = vxGraphParameterEnqueueReadyRef(obj->capture_graph, enc_pool->graph_parameter_index, (vx_reference*)&enc_pool->arr[obj->ldc_enq_id], 1);`

with the error:

```

   150.642728 s:  VX_ZONE_ERROR: [ownGraphParameterEnqueueReadyRef:693] Found a scope (2049) that was not object array or pyramid!
./run_app_multi_cam_codec.sh: line 11:  1185 Segmentation fault      (core dumped) /opt/vision_apps/vx_app_multi_cam_codec.out --cfg /opt/vision_apps/app_multi_cam_codec.cfg
```
Upon inspecting the datatype, it seems like enc_pool->arr[0] is, for some reason, a `vx_context`, and not a `vx_object_array`.
Full output below:
 
APP: Init ... !!!
    80.523913 s: MEM: Init ... !!!
    80.524042 s: MEM: Initialized DMA HEAP (fd=5) !!!
    80.524293 s: MEM: Init ... Done !!!
    80.524315 s: IPC: Init ... !!!
    80.578387 s: IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
    80.586957 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
    80.591640 s:  VX_ZONE_INFO: Globally Enabled VX_ZONE_ERROR
    80.591703 s:  VX_ZONE_INFO: Globally Enabled VX_ZONE_WARNING
    80.591715 s:  VX_ZONE_INFO: Globally Enabled VX_ZONE_INFO
    80.593195 s:  VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-0 
    80.593526 s:  VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-1 
    80.593736 s:  VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-2 
    80.593903 s:  VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-3 
    80.593928 s:  VX_ZONE_INFO: [tivxInitLocal:202] Initialization Done !!!
    80.593948 s:  VX_ZONE_INFO: Globally Disabled VX_ZONE_INFO
    80.597552 s: ISS: Enumerating sensors ... !!!
[MCU2_0]     80.597688 s: Cannot detect board type - using default DIRECT
[MCU2_0]     80.597723 s: [setupI2CInst]: Initializing I2C bus 2
[MCU2_0]     80.597740 s: !!!!!!!!!!!!! MCU_PLUS_SDK !!!!!!!!!!!
    80.716966 s: ISS: Enumerating sensors ... found 0 : IMX390-UB953_D3
    80.716991 s: ISS: Enumerating sensors ... found 1 : IMX390-UB953-DISCOVERY-NARROW
    80.717009 s: ISS: Enumerating sensors ... found 2 : IMX390-UB953-DISCOVERY-MID
    80.717019 s: ISS: Enumerating sensors ... found 3 : IMX390-UB953-DISCOVERY-WIDE
    80.717028 s: ISS: Enumerating sensors ... found 4 : AR0820-UB953_LI
    80.717038 s: ISS: Enumerating sensors ... found 5 : IMX728-UB971
    80.717047 s: ISS: Enumerating sensors ... found 6 : UB9xxx_RAW12_TESTPATTERN
    80.717057 s: ISS: Enumerating sensors ... found 7 : MAX25614-ILLUMINATOR
    80.717067 s: ISS: Enumerating sensors ... found 8 : STMICRO-VG5761
Sensor selected : IMX728-UB971
Querying IMX728-UB971 
    80.717095 s: ISS: Querying sensor [IMX728-UB971] ... !!!
    80.717171 s: ISS: Querying sensor [IMX728-UB971] ... Done !!!
Capture->Encode Selection Yes(1)/No(0)
1
Decode->Display Selection Yes(1)/No(0)
0
Max number of cameras supported by sensor IMX728-UB971 = 8 
Please enter number of channels to be enabled 
1
    88.963123 s: ISS: Initializing sensor [IMX728-UB971], doing IM_SENSOR_CMD_PWRON ... !!!
    88.963371 s: ISS: Initializing sensor [IMX728-UB971], doing IM_SENSOR_CMD_CONFIG ... !!!
[MCU2_0]     88.963263 s: IMX728_PowerOn : chId = 0x0 
[MCU2_0]     88.963287 s: PowerOn for channel: 0
[MCU2_0]     88.963453 s: Probing channel 0
[MCU2_0]     89.162748 s: IMX728_WaitForSensorStateAddressWalk[1036]: Reading device state[0x1b]: Status=0, result=0x2
[MCU2_0]     89.162782 s: IMX728_Probe Info: Setting address to : 0x1b.
[MCU2_0]     89.162801 s: >>>>>>>>>>>>>>>>>>Configuring IMX728...
[MCU2_0]     89.162831 s:  Configuring IMX728 imager 0x1b.. Please wait till it finishes 
[MCU2_0]     89.310571 s:  IMX728 config done
[MCU2_0]     89.310750 s: Configuring sensor: ChId: 0 Addr: 0x1b
[MCU2_0]     91.398752 s: Calibrating ADJ: ChId: 0 Addr: 0x1b
[MCU2_0]     91.408583 s: Calibrating DKSHD: ChId: 0 Addr: 0x1b
[MCU2_0]     91.827751 s: Calibrating PXSHD: ChId: 0 Addr: 0x1b
    92.171526 s: ISS: Initializing sensor [IMX728-UB971] ... Done !!!
[MCU2_0]     92.171401 s: IMX728 configure success!
gst_wrapper: GstCmdString:
appsrc format=GST_FORMAT_TIME is-live=true do-timestamp=true block=false name=myAppSrc0 ! queue 
! video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)NV12, interlace-mode=(string)progressive, colorimetry=(string)bt601 
! v4l2h264enc extra-controls="controls, frame_level_rate_control_enable=1, video_bitrate=10000000"
! h264parse 
! mp4mux 
! filesink location=output_video_0.mp4
 
 
=========================
Demo : Camera Demo
=========================
 
s: Save CSIx, VISS and LDC outputs
 
p: Print performance statistics
 
x: Exit
 
Enter Choice:     93.720966 s: ISS: Starting sensor [IMX728-UB971] ... !!!
[MCU2_0]     93.721166 s: Entering IssSensor_Start 
[MCU2_0]     93.721231 s:  Configuring IMX728 imager 0x1b.. Please wait till it finishes 
    93.917178 s: ISS: Starting sensor [IMX728-UB971] ... Done !!!
[MCU2_0]     93.916940 s:  IMX728 config done
[   85.363502] kauditd_printk_skb: 5 callbacks suppressed
    93.926254 s:  VX_ZONE_ERROR: [ownGraphParameterEnqueueReadyR[   85.363519] audit: type=1701 audit(1741187985.748:20): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=kernel pid=1170 comm="vx_app_multi_ca" e1
ef:687] Found a scope (2049) that was not object array or pyramid!
[   85.403581] audit: type=1334 audit(1741187985.788:21): prog-id=20 op=LOAD
[   85.410450] audit: type=1334 audit(1741187985.796:22): prog-id=21 op=LOAD
[   85.417292] audit: type=1334 audit(1741187985.804:23): prog-id=22 op=LOAD
./run_app_multi_cam_codec.sh: line 8:  1170 Segmentation fault      (core dumped) /opt/vision_apps/vx_app_multi_cam_codec.out --cfg /opt/vision_apps/app_multi_cam_codec.cfg
root@j722s-evm:/opt/vision_apps# [   87.396754] audit: type=1334 audit(1741187987.784:24): prog-id=22 op=UNLOAD
[   87.403781] audit: type=1334 audit(1741187987.784:25): prog-id=21 op=UNLOAD
[   87.410755] audit: type=1334 audit(1741187987.784:26): prog-id=20 op=UNLOAD