GNOME Bugzilla – Bug 697724
Rai.tv finalaze segmentation fault
Last modified: 2013-04-10 17:02:43 UTC
Created attachment 241169 [details] [review] patch to replace g_object_unref () with g_list_free_full () Hey, I was constantly getting Segmentation fault when I was playing and testing with grilo-test-ui. I was getting this error during shutting down plugins. I ran it with valgrind and the output is following: ==4748== at 0x3B1E03090B: g_type_check_instance_is_a (in /usr/lib64/libgobject-2.0.so.0.3600.0) ==4748== by 0x3B1E0141D6: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.0) ==4748== by 0x17289F4A: grl_raitv_source_finalize (grl-raitv.c:287) ==4748== by 0x3B1E01437A: g_object_unref (in /usr/lib64/libgobject-2.0.so.0.3600.0) ==4748== by 0x4C40157: grl_registry_unregister_source (grl-registry.c:728) ==4748== by 0x4C413F9: grl_registry_unload_plugin (grl-registry.c:1224) ==4748== by 0x40B48D: shutdown_plugins (main.c:2192) ==4748== by 0x405E06: shutdown_plugins_cb (main.c:253) ==4748== by 0x3B1E00F987: g_closure_invoke (in /usr/lib64/libgobject-2.0.so.0.3600.0) ==4748== by 0x3B1E02099C: ??? (in /usr/lib64/libgobject-2.0.so.0.3600.0) ==4748== by 0x3B1E028788: g_signal_emit_valist (in /usr/lib64/libgobject-2.0.so.0.3600.0) ==4748== by 0x3B1E0289D1: g_signal_emit (in /usr/lib64/libgobject-2.0.so.0.3600.0) Well, I looked into the code and found out that in finalize method are mappings unrefered as they were GObjects but they are GLists. I made a simple patch and so far I tried it, it works.
commit 10cb4e74de35e2f689afb6e5e8d32cb92e6b1096 Author: Marek Chalupa <mchalupa@redhat.com> Date: Wed Apr 10 16:38:48 2013 +0200 raitv: finalize method fixed. In grl_raitv_source_finalize () on lines 282 and 287 were raitv_[search|browse]_mappings unrefered like they were GObject, but they are GLists. g_object_unref () was therfore replaced by g_list_free_full () with g_free (full free because list is made up of structs allocated by g_new ()). https://bugzilla.gnome.org/show_bug.cgi?id=697724 src/raitv/grl-raitv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)