Meaning of GLib-GIO-CRITICAL assertion error
Asked Answered
W

2

6

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.

Worked answered 25/5, 2012 at 15:0 Comment(0)
M
12

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.

Manatee answered 12/6, 2012 at 23:28 Comment(0)
S
0

Try connecting your window to the application instance. Create it like this:

Gtk::ApplicationWindow window(app);
Santanasantayana answered 25/5, 2012 at 17:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.