Hi all,
I am developing a gstreamer application on Jetson TX2 which is supposed to process video coming from a CSI camera.
At one point in my pipeline, I get a segmentation fault and the program crashes with the following message.
According to gdb the crash occurs somewhere here:
The strange thing is that the calling code looks like this:
void fillWorkingBuffer(GstBuffer* gst_buffer, int working_fd) {
GstMapInfo in_map_info;
if (gst_buffer_map(gst_buffer, &in_map_info, GST_MAP_READ) == false) {
SafePrint("Failed to map gstbuffer data for read access", AnsiColor::BLUE);
std::exit(1);
}
int in_dmabuf_fd = -1;
if (ExtractFdFromNvBuffer(in_map_info.data, &in_dmabuf_fd) != 0) {
SafePrint("Failed to map hardware buffer on gstbuffer data", AnsiColor::BLUE);
std::exit(1);
}
NvBufferParams params = { };
if (NvBufferGetParams(in_dmabuf_fd, ¶ms) != 0) {
SafePrint("Failed to extract buffer params for fd=" + std::to_string(in_dmabuf_fd), AnsiColor::BLUE);
std::exit(1);
}
if (NvBufferComposite(&in_dmabuf_fd, working_fd, &composite_params) != 0) {
SafePrint("Failed NvBufferComposite from " + std::to_string(in_dmabuf_fd) + " to " + std::to_string(working_fd), AnsiColor::BLUE);
std::exit(1);
}
if (NvReleaseFd(in_dmabuf_fd) != 0) {
SafePrint("Failed to release Fd=" + std::to_string(in_dmabuf_fd), AnsiColor::BLUE);
std::exit(1);
}
gst_buffer_unmap(gst_buffer, &in_map_info);
}
So ExtractFdFromNvBuffer has given me the dmabuf_fd of 1286 and returned a success code.
I am able to call NvBufferGetParams without error, yet when NvBufferComposite apparently calls this same function under the hood something goes wrong.
Any idea what could be going wrong here?