AR# 73274


2019.1 Zynq UltraScale+ MPSoC VCU - Why does the VCU decoder crash when trying to read video data from a file in small chunks using the vcu_omx_decoder application?


Why does the VCU decoder crash when trying to read video data from a file in small chunks?

When the decoder tries to read data chunk by chunk (for example reading 10240 bytes each time), it crashes.

Process 286759 (vcu_omx_decoder) terminated SIGSEGV code=1 fltno=11 ip=0000000001079358(/usr/lib/ mapaddr=0000000000079358. ref=0000000028000000
Memory fault (core dumped) 


Normally the VCU decoder allocates a large buffer using the argument from the API.

The API is part of main.cpp.

The following change needs to be made to the code to read data in small chunks:

static bool readFrame(OMX_BUFFERHEADERTYPE* pInputBuf, Application& app)
  assert(pInputBuf->nAllocLen != 0);
  vector<uint8_t> frame(pInputBuf->nAllocLen);
  printf("readFrame, pInputBuf->nAllocLen: %d, pInputBuf->nOffset: %d, frame.size: %d\n", pInputBuf->nAllocLen, pInputBuf->nOffset, frame.size());*), 10240);
  auto data = (char*)(pInputBuf->pBuffer + pInputBuf->nOffset);
  memcpy(data,, 10240);

  pInputBuf->nFilledLen = infile.gcount();
  printf("readFrame, pInputBuf->nFilledLen: %d\n", pInputBuf->nFilledLen);
  if(infile.peek() == EOF)

{    printf("EXIT readFrame, true\n");     return true;   }
  printf("EXIT readFrame, false\n");
  return false;

There is a known issue with the vcu_omx_decoder application when it is modified to read chunks of 10240 bytes from the file source. 

Once the input buffer has read the first bytes of data, it gets deleted by buffer handling operations to free it up to read new data. 

As a result of this operation, a memory fault error is reported. 

For effective operation of the decoder, complete frame data should be retained and the buffer should be freed without destroying memory.

  • 2019.1 - Users can download the PetaLinux Recipes and Patch files from (Xilinx Answer 72324) to work around this issue
  • 2019.2 - This issue will be resolved in the 2019.2 release and later versions

Linked Answer Records

Master Answer Records

AR# 73274
Date 01/25/2020
Status Active
Type Known Issues
Boards & Kits
People Also Viewed