OpenIPC / majestic

Majestic Community edition integration kit
MIT License
38 stars 6 forks source link

Hi3518EV100 /image.yuv420 causes error, later seg fault #105

Open TheChatty opened 1 year ago

TheChatty commented 1 year ago

Required information

Issue description

When requesting http://ipcam/image.yuv420 for the first time, majestic starts to print failure messages. At the second time it segfaults:

23:20:21  <  thread-pool-1> [     hal] take_yuv420sp_video_fram@1156 Cannot get chn 0 frame for vpssGrp=0
23:20:21  <  thread-pool-1> [     hal] take_yuv420sp_video_fram@1156 ERR_VENC_NOBUF: The buffer fails to be allocated due to some causes such as oversize of the data buffer applied for
23:20:21  <  thread-pool-1> [     sdk] sdk_take_yuv@3400             Cannot take yuv420sp VI frame
23:20:21  <  thread-pool-1> [     sdk] sdk_take_yuv@3400             ERR_VENC_NOBUF: The buffer fails to be allocated due to some causes such as oversize of the data buffer applied for
23:20:21  <      hi_logger> [      vi] ViuDrvProcPrepFrm@2931        [    vi] s32PhyChn 0 get vb fail,w:1280,h:720
23:20:22  <      hi_logger> [      vi] ViuDrvProcPrepFrm@2931        [    vi] s32PhyChn 0 get vb fail,w:1280,h:720
23:20:22  <      hi_logger> [      vi] ViuDrvProcPrepFrm@2931        [    vi] s32PhyChn 0 get vb fail,w:1280,h:720
23:20:22  <      hi_logger> [      vi] ViuDrvProcPrepFrm@2931        [    vi] s32PhyChn 0 get vb fail,w:1280,h:720
23:20:22  <      hi_logger> [      vi] ViuDrvProcPrepFrm@2931        [    vi] s32PhyChn 0 get vb fail,w:1280,h:720
23:20:22  <      hi_logger> [      vi] ViuDrvProcPrepFrm@2931        [    vi] s32PhyChn 0 get vb fail,w:1280,h:720
23:20:22  <      hi_logger> [      vi] ViuDrvProcPrepFrm@2931        [    vi] s32PhyChn 0 get vb fail,w:1280,h:720
23:20:22  <      hi_logger> [      vi] ViuDrvProcPrepFrm@2931        [    vi] s32PhyChn 0 get vb fail,w:1280,h:720
Segmentation fault

Expectations

Failure free image delivery.

Steps to reproduce

  1. request http://ipcam/image.yuv420
  2. request http://ipcam/image.yuv420

Information to attach

widgetii commented 1 year ago

Not enough mmz RAM for media data. Consider increasing blkCnt param in case if it's possible on the board

TheChatty commented 1 year ago

With blkCnt: 18I get valg alloc mmz buffer failed!.

With blkCnt: 17I see Free MMZ mem before allocation: 31868KB Free MMZ mem after allocation: 8372KB Free MMZ mem finally: 520KB but still get Cannot get chn 0 frame for vpssGrp=0, ERR_VENC_NOBUF: The buffer fails to be allocated due to ....

widgetii commented 1 year ago

There is no such amount of memory for 17 or 18 blocks

TheChatty commented 1 year ago

The important thing: with blkCnt: 10 I still can't take yuv420 image.