<div dir="ltr">Yeah, so the reason I was asking about the nature g_assert being compiled out is the following from the documentation: <br><br><a href="https://developer.gnome.org/glib/stable/glib-Testing.html#g-assert">https://developer.gnome.org/glib/stable/glib-Testing.html#g-assert</a>  <br><p style="margin:0.4em 0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"><span style="font-size:14px">The macro can be turned off in final releases of code by defining </span><code class="gmail-literal" style="font-size:14px;margin:0px;padding:1px;border:0px;vertical-align:baseline;background:rgba(0,0,0,0.1)">G_DISABLE_ASSERT</code><span style="font-size:14px"> when compiling the application, so code must not depend on any side effects from </span><span class="gmail-parameter" style="font-size:14px;margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"><code style="margin:0px;padding:1px;border:0px;vertical-align:baseline;background:rgba(0,0,0,0.1)">expr</code></span><span style="font-size:14px"> . Similarly, it must not be used in unit tests, otherwise the unit tests will be ineffective if compiled with </span><code class="gmail-literal" style="font-size:14px;margin:0px;padding:1px;border:0px;vertical-align:baseline;background:rgba(0,0,0,0.1)">G_DISABLE_ASSERT</code><span style="font-size:14px">. Use </span><a class="gmail-link" href="https://developer.gnome.org/glib/stable/glib-Testing.html#g-assert-true" title="g_assert_true()" style="font-size:14px;text-decoration-line:none;color:rgb(93,57,110);margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"><code class="gmail-function" style="margin:0px;padding:1px;border:0px;vertical-align:baseline;background:rgba(0,0,0,0.1)">g_assert_true()</code></a><span style="font-size:14px"> and related macros in unit tests instead.</span><br><span style="font-size:14px"><br>I knew that compiling it out was something that could be done, and I just wanted to make sure that the code I was using was indeed built as it was intended. I'll try updating and see if it goes away. Thanks. <br></span></p><div class="gmail-refsect3" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background:transparent"><a name="g-assert.parameters" style="color:rgb(32,74,135);margin:0px;padding:0px;border:0px;vertical-align:baseline;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;font-family:Verdana,Arial,sans-serif"></a><br class="gmail-Apple-interchange-newline"></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 1, 2019 at 2:11 PM Sebastian Dröge <<a href="mailto:sebastian@centricular.com">sebastian@centricular.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 2019-10-01 at 11:24 -0500, Ben Rush wrote:<br>
> I might be missing something fundamental with respect to the use of<br>
> g_assert, but it looks as though it's something intended to be built<br>
> out of production or "release" code, right? <br>
<br>
Assertions are also in release code. If they're hit then the internal<br>
state of the code is so wrong that there's no reasonable way forward.<br>
Just compiling them out would cause potentially worse problems :)<br>
<br>
> I ask because I've been encountering (on Windows) a number of<br>
> strange, sudden program "crashes" which, upon adding some program-<br>
> wide exception trapping code to my server, seems to actually be<br>
> assert statements executing and taking down the host process. For<br>
> example, I was notified of an RTSP server in production going down<br>
> and upon looking at the logs, I see that my trap code generated this<br>
> stack trace: <br>
> <br>
> at 0x7ff93969c902, with code 80000003 in module<br>
> C:\Windows\System32\KERNELBASE.dll, stack:<br>
>  ?????, DebugBreak:??????<br>
> d:\projects\cerbero\autotools\master\build\sources\windows_x86_64\gli<br>
> b-2.56.1\glib\gutils.c, g_abort:2566<br>
> d:\projects\cerbero\autotools\master\build\sources\windows_x86_64\gli<br>
> b-2.56.1\glib\gtestutils.c, g_assertion_message:2533<br>
> d:\projects\cerbero\autotools\master\build\sources\windows_x86_64\gli<br>
> b-2.56.1\glib\gtestutils.c, g_assertion_message_expr:2556<br>
> d:\projects\cerbero\autotools\master\build\sources\windows_x86_64\gst<br>
> -plugins-base-1.0-1.15.2\gst-libs\gst\rtsp\gstrtspconnection.c,<br>
> gst_rtsp_source_dispatch_write:3899<br>
<br>
This problem should be fixed already, it looks very similar to one of<br>
the issues that were fixed in the last months. You're using a rather<br>
old development version of GStreamer (odd minor version number: 15).<br>
Please try again with 1.16.1, and if the problem still exists please<br>
create an issue in gitlab. Thanks!<br>
<br>
-- <br>
Sebastian Dröge, Centricular Ltd · <a href="https://www.centricular.com" rel="noreferrer" target="_blank">https://www.centricular.com</a><br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div>