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 705582 - gtk_recent_manager_init fails to check settings==NULL
gtk_recent_manager_init fails to check settings==NULL
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-08-06 17:06 UTC by jutaky
Modified: 2014-12-22 11:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jutaky 2013-08-06 17:06:02 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
Comment 1 Morten Welinder 2013-08-06 18:29:03 UTC
I don't see that.

Could you try setting a breakpoing on g_log and get a backtrace?
Comment 2 jutaky 2013-08-06 18:39:04 UTC
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
  • #0 g_log
  • #1 g_type_check_instance
    at gtype.c line 4094
  • #2 g_signal_connect_data
    at gsignal.c line 2435
  • #3 g_type_create_instance
    at gtype.c line 1868
  • #4 g_object_new_internal
    at gobject.c line 1743
  • #5 g_object_newv
    at gobject.c line 1887
  • #6 g_object_new
    at gobject.c line 1553
  • #7 gtk_recent_manager_get_default
    from /usr/lib/libgtk-3.so.0
  • #8 gnm_app_init
    at application.c line 1405
  • #9 g_type_create_instance
    at gtype.c line 1868
  • #10 g_object_new_internal
    at gobject.c line 1743
  • #11 g_object_newv
    at gobject.c line 1887
  • #12 g_object_new
    at gobject.c line 1553
  • #13 gnm_init
    at libgnumeric.c line 256
  • #14 main
    at ssconvert.c line 832

Comment 3 Morten Welinder 2013-08-06 18:47:49 UTC
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+.
Comment 4 Matthias Clasen 2014-12-09 04:55:26 UTC
if you are calling gtk_recent_manager_get_default without calling gtk_init first, its your bug.
Comment 5 Morten Welinder 2014-12-09 12:40:38 UTC
> 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.