After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724660 - Warnings on exit
Warnings on exit
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2014-02-18 15:57 UTC by Bastien Nocera
Modified: 2014-03-02 21:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
core: Free registry resources before unreffing it (6.87 KB, patch)
2014-03-02 01:27 UTC, Juan A. Suarez Romero
committed Details | Review

Description Bastien Nocera 2014-02-18 15:57:03 UTC
When calling grl_deinit(), it seems that there's an ordering problem in how we free everything.

I get two warnings like:
(lt-grilo-test-ui-0.2:4128): Grilo-WARNING **: [data] data/grl-data.c:118: Related keys not found for key "(null)"

Both of which come from GrlPls based sources:
  • #0 g_logv
    at gmessages.c line 1038
  • #1 g_log
    at gmessages.c line 1071
  • #2 grl_log_valist
    at grl-log.c line 301
  • #3 grl_log
    at grl-log.c line 329
  • #4 get_sample_key
    at data/grl-data.c line 117
  • #5 grl_data_length
    at data/grl-data.c line 807
  • #6 grl_data_get
    at data/grl-data.c line 163
  • #7 grl_data_get_string
    at data/grl-data.c line 260
  • #8 grl_media_finalize
    at data/grl-media.c line 73
  • #9 g_object_unref
    at gobject.c line 3110
  • #10 grl_guardianvideos_source_finalize
    at grl-guardianvideos.c line 170
  • #11 g_object_unref
    at gobject.c line 3110
  • #12 grl_registry_finalize
    at grl-registry.c line 207
  • #13 g_object_unref
    at gobject.c line 3110
  • #14 grl_deinit
    at grilo.c line 184
  • #15 main
    at main.c line 2436
  • #0 g_logv
    at gmessages.c line 1038
  • #1 g_log
    at gmessages.c line 1071
  • #2 grl_log_valist
    at grl-log.c line 301
  • #3 grl_log
    at grl-log.c line 329
  • #4 get_sample_key
    at data/grl-data.c line 117
  • #5 grl_data_length
    at data/grl-data.c line 807
  • #6 grl_data_get
    at data/grl-data.c line 163
  • #7 grl_data_get_string
    at data/grl-data.c line 260
  • #8 grl_media_finalize
    at data/grl-media.c line 73
  • #9 g_object_unref
    at gobject.c line 3110
  • #10 grl_freebox_source_finalize
    at grl-freebox.c line 219
  • #11 g_object_unref
    at gobject.c line 3110
  • #12 grl_registry_finalize
    at grl-registry.c line 207
  • #13 g_object_unref
    at gobject.c line 3110
  • #14 grl_deinit
    at grilo.c line 184
  • #15 main
    at main.c line 2436

Key 28 is:
GRL_METADATA_KEY_TITLE
Comment 1 Juan A. Suarez Romero 2014-03-02 01:27:15 UTC
Created attachment 270663 [details] [review]
core: Free registry resources before unreffing it

We can't unref the registry to finalize all the sources and plugins, because
they can try to access the registry again in their finalize method.

This commit first finalizes the sources, plugins, and other resources, and at
the end it unrefs the registry.
Comment 2 Juan A. Suarez Romero 2014-03-02 21:45:01 UTC
Attachment 270663 [details] pushed as 5520b4e - core: Free registry resources before unreffing it