GNOME Bugzilla – Bug 777977
validate: tests should call gst_validate_deinit()
Last modified: 2017-01-31 13:45:10 UTC
Tests like validate/monitoring are leaking the registry because gst_validate_deinit() is not called. 0:00:00.095931145 23714 0x1f822d0 TRACE GST_TRACER :0:: object-alive, type-name=(string)GstRegistry, address=(gpointer)0x1e3b6a0, description=(string)<registry1>, ref-count=(uint)1, trace=(string)gst_debug_get_stack_trace (gstinfo.c:2782) handle_object_created (gstleaks.c:322) object_created_cb (gstleaks.c:352) gst_object_constructed (gstobject.c:141) g_object_new_internal (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0cc13) g_object_newv (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0e0a9) gst_validate_registry_get (validate.c:75) gst_validate_init_plugins (validate.c:192) gst_validate_init (validate.c:279) gst_validate_runner_constructor (gst-validate-runner.c:349) g_object_new_internal (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0c4c5) g_object_newv (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0e0a9) g_object_new (/usr/lib64/libgobject-2.0.so.0.5000.2:0x7f02b9d0e860) gst_validate_runner_new (gst-validate-runner.c:475) monitors_cleanup (monitoring.c:77) tcase_run_tfun_fork (check_run.c:465) srunner_iterate_tcase_tfuns (check_run.c:237) srunner_run_tcase (check_run.c:377) srunner_iterate_suites (check_run.c:205) srunner_run_tagged (check_run.c:744) srunner_run (check_run.c:758) srunner_run_all (check_run.c:696) gst_check_run_suite (gstcheck.c:1057) main (monitoring.c:108) The easy fix is to register it using atexit() as gst_check_init() is doing for gst_deinit().
Fix: https://phabricator.freedesktop.org/D1630
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Date: Tue Jan 31 11:35:30 2017 +0100 validate: tests: call gst_validate_deinit() gst_validate_deinit() needs to be called when the test is done to remove false positives when using the leaks tracer. https://bugzilla.gnome.org/show_bug.cgi?id=777977 Differential Revision: https://phabricator.freedesktop.org/D1630