libs: check: print stacktrace on unexpected criticals

This commit is contained in:
Tim-Philipp Müller 2018-01-11 12:27:18 +00:00
parent c5e1dc4ee6
commit 88dfd9ee48

View file

@ -274,7 +274,15 @@ static void gst_check_log_critical_func
return;
if (!_gst_check_expecting_log) {
gchar *trace;
g_print ("\n\nUnexpected critical/warning: %s\n", message);
trace = gst_debug_get_stack_trace (GST_STACK_TRACE_SHOW_FULL);
if (trace) {
g_print ("\nStack trace:\n%s\n", trace);
g_free (trace);
}
fail ("Unexpected critical/warning: %s", message);
}