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 702551 - GApplication crashes with assertion on application being registered failing
GApplication crashes with assertion on application being registered failing
Status: RESOLVED NOTABUG
Product: glib
Classification: Platform
Component: gapplication
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 664946
 
 
Reported: 2013-06-18 12:23 UTC by Chandni Verma
Modified: 2013-06-18 13:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Chandni Verma 2013-06-18 12:23:38 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
  • #0 g_logv
  • #1 g_log
    at gmessages.c line 1010
  • #2 g_return_if_fail_warning
    at gmessages.c line 1019
  • #3 g_application_list_actions
    at gapplication.c line 1650
  • #4 g_action_group_list_actions
    at gactiongroup.c line 349
  • #5 g_action_muxer_insert
    at gactionmuxer.c line 644
  • #6 gtk_widget_insert_action_group
    at gtkwidget.c line 14868
  • #7 gtk_window_set_application
    at gtkwindow.c line 2781
  • #8 handler_application_construct
    at gnome-chess-handler-application.c line 732
  • #9 handler_application_new
    at gnome-chess-handler-application.c line 763
  • #10 gnome_chess_channel_handler_main
    at gnome-chess-channel-handler.c line 137
  • #11 main
    at gnome-chess-channel-handler.c line 150

Comment 1 Chandni Verma 2013-06-18 12:36:24 UTC
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
Comment 2 Allison Karlitskaya (desrt) 2013-06-18 13:26:16 UTC
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().