Random access violation (seg. fault) when calling GStreamer functions from MATLAB context in Windows

Nirbheek Chauhan nirbheek.chauhan at gmail.com
Wed Mar 13 06:52:20 UTC 2019


On Wed, Mar 13, 2019 at 2:56 AM Marc Gelinas <mgelinas at kinova.ca> wrote:
> After confirming that I was able to stream my video feed with gst-launch (using the same pipeline), the issue was "fixed" when I tried again to stream from my DLL. The issue never came back.
>

This was probably because of the gst registry being out of date, you
must've done something that triggered an update.

> Unfortunately, I still have the following issue:
>
> ISSUE: A few seconds after MATLAB unloads my DLL, sometimes it crashes with the following backtrace:
> Stack Trace (from fault):
> [  0] 0x00000000d32924c0                                   <unknown-module>+00000000
> [  1] 0x000007fec1104bf3    C:\gstreamer\1.0\x86_64\bin\gstreamer-1.0-0.dll+00347123 gst_value_init_and_copy+00333927
> [  2] 0x000007fec110418d    C:\gstreamer\1.0\x86_64\bin\gstreamer-1.0-0.dll+00344461 gst_value_init_and_copy+00331265
> [  3] 0x000007fec1637a88      C:\gstreamer\1.0\x86_64\bin\gstrtsp-1.0-0.dll+00031368 gst_rtsp_message_steal_body+00026102
> [  4] 0x000007fec1eb3032 C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\gstrtsp.dll+00012338 gst_plugin_rtsp_register+00007882
> [  5] 0x000007fec1ec4db8 C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\gstrtsp.dll+00085432 gst_plugin_rtsp_register+00080976
> [  6] 0x000007fec1ebe50c C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\gstrtsp.dll+00058636 gst_plugin_rtsp_register+00054180
> [  7] 0x000007fec1eb8c82 C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\gstrtsp.dll+00035970 gst_plugin_rtsp_register+00031514
> [  8] 0x000007fec1ec0af1 C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\gstrtsp.dll+00068337 gst_plugin_rtsp_register+00063881
> [  9] 0x000007fec1ecccaf C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\gstrtsp.dll+00117935 gst_plugin_rtsp_register+00113479
> [ 10] 0x000007fec115320c    C:\gstreamer\1.0\x86_64\bin\gstreamer-1.0-0.dll+00668172 gst_value_init_and_copy+00654976
> [ 11] 0x000007feb3d8b0f4         C:\gstreamer\1.0\x86_64\bin\glib-2.0-0.dll+00438516 g_date_get_monday_week_of_year+00425260
> [ 12] 0x000007feb3d8a3f6         C:\gstreamer\1.0\x86_64\bin\glib-2.0-0.dll+00435190 g_date_get_monday_week_of_year+00421934
> [ 13] 0x000007feb3db32f7         C:\gstreamer\1.0\x86_64\bin\glib-2.0-0.dll+00602871 g_date_get_monday_week_of_year+00589615
> [ 14] 0x000007fec9b80369 C:\Program Files\MATLAB\R2018b\bin\win64\ucrtbase.DLL+00131945 o__strtoui64+00000089
> [ 15] 0x00000000773f59cd                   C:\windows\system32\kernel32.dll+00088525 BaseThreadInitThunk+00000013
> [ 16] 0x000000007755383d                      C:\windows\SYSTEM32\ntdll.dll+00342077 RtlUserThreadStart+00000029
>
> The crash seems to occur only if previously I had a failed attempt to stream a video feed. For instance, I specify a wrong IP address for the rtspsrc. Then, when I make MATLAB unload my DLL, the crash occurs after a few seconds. Do you have any idea what could be the root cause?

I don't think it's safe to unload gstreamer DLLs; at least I don't
know of anyone who uses that. It may be possible to make that safe,
though. We'd be happy to accept reasonable patches for it.

> Also, do you know if the release of stable version 1.16 is still planned for this month?
>

AFAIK, yes, unless there's some major release-blocking bug. The MSVC
builds are still 'beta', so issues in that will not block/delay the
release unless they're easy to fix.

Cheers,
Nirbheek


More information about the gstreamer-devel mailing list