GNOME Bugzilla – Bug 783647
gst-omx: Segfault in gst_omx_memory_map()
Last modified: 2018-05-07 15:55:39 UTC
From time to time, we segfault inside gst_omx_memory_map() as below. Most specifically, omem->buf->omx_buf is NULL. x #5 0x71b669bc in gst_omx_memory_map (mem=0x71a4cf18, maxsize=470016, flags=GST_MAP_READ) at gstomxbufferpool.c:81 81 return omem->buf->omx_buf->pBuffer + omem->mem.offset; (gdb) print omem $1 = (GstOMXMemory *) 0x71a4cf18 (gdb) print omem->buf $2 = (GstOMXBuffer *) 0x74c161c0 (gdb) print omem->buf->omx_buf $3 = (OMX_BUFFERHEADERTYPE *) 0x0 (gdb) print omem->mem.offset $4 = 0 The stacktrace is as below.
+ Trace 237566
Created attachment 353549 [details] [review] Fail gracefully if any of the components of GstOMXMemory is NULL Avoid the segfault by gracefully returning NULL. This is in turn checked in gstmemory.c for NULL, which handles the error.
The question is rather *why* is it NULL. It should never be NULL at that point. Can you debug that, and e.g. check from a debug log?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!