GNOME Bugzilla – Bug 702551
GApplication crashes with assertion on application being registered failing
Last modified: 2013-06-18 13:26:16 UTC
Glib version is: 2.36.3 On starting my application with this version, I get the following error and backtrace (with G_DEBUG=fatal-criticals): (I didn't get this error with an earlier version of glib. Is there any setting requiring change) GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. [New Thread 0xb406db40 (LWP 11135)] (gnome-chess-channel-handler:11130): GLib-GIO-CRITICAL **: g_application_list_actions: assertion `application->priv->is_registered' failed Program received signal SIGTRAP, Trace/breakpoint trap. 0xb6c985eb in g_logv (log_domain=0xb747787d "GLib-GIO", log_level=G_LOG_LEVEL_CRITICAL, format=0xb6d1e418 "%s: assertion `%s' failed", args=0xbfffe8dc "\275\177G\267(}G\267\220)\377\267h\340\026\b\240\206ɶ}xG\267") at gmessages.c:974 974 G_BREAKPOINT (); (gdb) bt full
+ Trace 232089
This happens on launching /src/gnome-chess-channel-handler from my branch on gnome-chess: https://git.gnome.org/browse/gnome-chess/log/?h=chess-telepathy-networking-support-664946-communicate
You need to make sure that the application has been registered and that you are the primary instance before you create any windows. In general, your main() function should only consist of creating a GtkApplication instance and calling run() on it. You can do further setup functions in the startup() signal/vfunc callback. You shouldn't actually create/show any windows until you get activate().