Frame capture with callback segfault

Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.6.0.8170
1.5.1.7815
1.5.0.7774
other

Host Machine Version
native Ubuntu 18.04
other

Referring to frame capture example: /usr/local/driveworks-2.2/doc/nvsdk_html/image_usecase1.html and samples/image_capture

Initialisation is like this:

  dwFrameCaptureParams frameParams{};
  std::string params = "type=user";
//  std::string params = "type=file";
  params += ",format=h264";
  params += ",bitrate=8000000";
  params += ",framerate=30";
//  params += ",file=video.h264";
  frameParams.params.parameters = params.c_str();
  frameParams.width = imageWidth;
  frameParams.height = imageHeight;
  frameParams.mode = DW_FRAMECAPTURE_MODE_SERIALIZE;
  frameParams.params.onData = (dwSensorSerializerOnDataFunc_t) &doSerialize;
  CHECK_DW_ERROR(dwFrameCapture_initialize(&m_frameCapture, &frameParams, m_sal, m_sdk));

Callback function is like this:

void doSerialize(const uint8_t *data, size_t size, void *userData) {
  std::cout << "Hello!" << std::endl;
  (void)userData;
  (void)data;
  (void)size;
}

Capture inside loop is like this:

CHECK_DW_ERROR(dwFrameCapture_appendFrameCUDA(image, m_frameCapture));
// this is where it segfaults

Please help, not sure why it doesn’t work!

Hi @sleff,
Please see if the below topic helps.

Hi @VickNV

Thanks for linking that post! Looks like there was a similar bug reported, but not clear if it was fixed because the version number isn’t included.

I can’t tell what version that was, but it’s been more than a year since that post so it should be fixed by now :)

DriveWorks 3.5 has the fix.