GNOME Bugzilla – Bug 705582
gtk_recent_manager_init fails to check settings==NULL
Last modified: 2014-12-22 11:04:52 UTC
When I run "ssconvert --list-exporters" I have the following before the expected output: (ssconvert:1223): GLib-GObject-WARNING **: invalid (NULL) pointer instance (ssconvert:1223): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed Happens with --list-importers too. Does not happen with --version. Is there something I should/could run for more information? Seems to be cosmetical only. The output is fine otherwise. -- Juha Kylmänen Research Assistant, OUSPG
I don't see that. Could you try setting a breakpoing on g_log and get a backtrace?
Breakpoint 1, g_log (log_domain=0x7ffff40894c3 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=0x7ffff408ad58 "invalid (NULL) pointer instance") at gmessages.c:1024 1024 va_start (args, format); (gdb) bt
+ Trace 232351
That looks like a gtk+ bug. gtk_recent_manager_init calls gtk_settings_get_default, but fails to check for a NULL return value. You see this with ssconvert because it runs without gui. --> GTK+.
if you are calling gtk_recent_manager_get_default without calling gtk_init first, its your bug.
> if you are calling gtk_recent_manager_get_default without calling gtk_init > first, its your bug. I disagree for three reasons: 1. This has been working for 15+ years. It's established API. 2. It is documented. This is from gtkmain.c: * Note that there are some alternative ways to initialize GTK+: * if you are calling gtk_parse_args(), gtk_init_check(), * gtk_init_with_args() or g_option_context_parse() with * the option group returned by gtk_get_option_group(), * you don’t have to call gtk_init(). 3. It's useful. This is for a command-line tool. No connection to the display manager is desired, yet using the GtkRecentManager is still perfectly meaningful.