• Hardware Platform (Jetson / GPU) ORIN AGX
• DeepStream Version 6.1.1
• JetPack Version 5.0.2
I am trying to port working code from DS 5.1 to DS 6.1.1. The code is doing some custom preprocessing to frame data before SGIE in convert_batch_and_push_to_input_thread
method (gstnvinfer.cpp
). The problem is that I get SIGSEGV
in /usr/lib/aarch64-linux-gnu/tegra/libnvbufsurface.so.1.0.0
everytime I call NvBufSurfaceMap()
with &(nvinfer->tmp_surf)
:
NvBufSurfaceMap (&nvinfer->tmp_surf, -1, -1, NVBUF_MAP_READ)
Example code (based on DeepStream SDK FAQ - #17 by mchi):
...
static gboolean
convert_batch_and_push_to_input_thread (GstNvInfer *nvinfer,
GstNvInferBatch *batch, GstNvInferMemory *mem)
{
...
nvtxDomainRangePushEx(nvinfer->nvtx_domain, &eventAttrib);
NvBufSurface *tmp_surf = &(nvinfer->tmp_surf);
for (uint32_t bs = 0; bs < tmp_surf->batchSize; bs++) {
NvBufSurfaceParams *sur = &(tmp_surf->surfaceList[bs]);
if (sur == NULL)
break;
NvBufSurfacePlaneParams *planeParams = &(sur->planeParams);
for (uint32_t p = 0; p < planeParams->num_planes; p++) {
if (NvBufSurfaceMap (tmp_surf, bs, p, NVBUF_MAP_READ) != 0) // <- SIGSEGV
printf("NvBufSurfaceMap failed ===============\n");
if(tmp_surf->memType == NVBUF_MEM_SURFACE_ARRAY) {
NvBufSurfaceSyncForCpu (tmp_surf, bs, p);
}
}
for (uint32_t p = 0; p < planeParams->num_planes; p++)
NvBufSurfaceUnMap (tmp_surf, bs, p);
}
...
}
...
Is it a bug or is there a different approach to access frame data in DS6?