g_assert in production code?

Sebastian Dröge sebastian at centricular.com
Tue Oct 1 19:10:57 UTC 2019


On Tue, 2019-10-01 at 11:24 -0500, Ben Rush wrote:
> I might be missing something fundamental with respect to the use of
> g_assert, but it looks as though it's something intended to be built
> out of production or "release" code, right? 

Assertions are also in release code. If they're hit then the internal
state of the code is so wrong that there's no reasonable way forward.
Just compiling them out would cause potentially worse problems :)

> I ask because I've been encountering (on Windows) a number of
> strange, sudden program "crashes" which, upon adding some program-
> wide exception trapping code to my server, seems to actually be
> assert statements executing and taking down the host process. For
> example, I was notified of an RTSP server in production going down
> and upon looking at the logs, I see that my trap code generated this
> stack trace: 
> 
> at 0x7ff93969c902, with code 80000003 in module
> C:\Windows\System32\KERNELBASE.dll, stack:
>  ?????, DebugBreak:??????
> d:\projects\cerbero\autotools\master\build\sources\windows_x86_64\gli
> b-2.56.1\glib\gutils.c, g_abort:2566
> d:\projects\cerbero\autotools\master\build\sources\windows_x86_64\gli
> b-2.56.1\glib\gtestutils.c, g_assertion_message:2533
> d:\projects\cerbero\autotools\master\build\sources\windows_x86_64\gli
> b-2.56.1\glib\gtestutils.c, g_assertion_message_expr:2556
> d:\projects\cerbero\autotools\master\build\sources\windows_x86_64\gst
> -plugins-base-1.0-1.15.2\gst-libs\gst\rtsp\gstrtspconnection.c,
> gst_rtsp_source_dispatch_write:3899

This problem should be fixed already, it looks very similar to one of
the issues that were fixed in the last months. You're using a rather
old development version of GStreamer (odd minor version number: 15).
Please try again with 1.16.1, and if the problem still exists please
create an issue in gitlab. Thanks!

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191001/1fd84915/attachment.sig>


More information about the gstreamer-devel mailing list