Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of GLib-GIO-CRITICAL assertion error

I successfully compiled the following program simple.cc:

#include <gtkmm.h>

int main (int argc, char *argv[])
{
  Glib::RefPtr<Gtk::Application> app = 
    Gtk::Application::create(argc, argv,
      "org.gtkmm.examples.base");

  Gtk::ApplicationWindow window;

  return app->run(window);
}

using the following command:

g++ simple.cc -o simple `pkg-config gtkmm-3.0 --cflags --libs`

Which gave me the executable simple, but when I tried to run it, I got the following error:

(simple:2964): GLib-GIO-CRITICAL **: g_application_list_actions: assertion `application->priv->is_registered' failed
Segmentation fault (core dumped)

As far as I can tell, I have the latest and greatest GLib packages. I'm running Ubuntu 12.04 LTS.

like image 823
mring Avatar asked May 25 '12 15:05

mring


1 Answers

I had the same problem as I have just started on the same tutorial. Replace:

    Gtk::ApplicationWindow window;

with

    GTK::Window window;

If you read the description of the code in the tutorial the latter is actually the code that is discussed. Making this change made the program work for me.

like image 111
mcheema Avatar answered Nov 13 '22 14:11

mcheema