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 762421 - nm-applet sometimes crashes when clicking on the icon (nma_clear_icon/g_type_check_instance_is_fundamentally_a)
nm-applet sometimes crashes when clicking on the icon (nma_clear_icon/g_type_...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-applet
git master
Other Linux
: Normal major
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: nm-1-2
 
 
Reported: 2016-02-22 02:17 UTC by Faidon Liambotis
Modified: 2016-03-11 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Faidon Liambotis 2016-02-22 02:17:26 UTC
Sometimes when clicking on the nm-applet icon, nm-applet crashes with a SIGSEGV. This is running under the MATE desktop. There is a similar report of a couple of users running Xfce over at RedHat's bugzilla (RH #1279937, 1284671).

I've managed to grab a corefile -- this is the stack trace + some light navigation of the stack:

(gdb) bt
  • #0 g_type_check_instance_is_fundamentally_a
    at /build/glib2.0-2.46.2/./gobject/gtype.c line 4032
  • #1 g_object_unref
    at /build/glib2.0-2.46.2/./gobject/gobject.c line 3076
  • #2 nma_clear_icon
    at applet.c line 3066
  • #3 nma_icons_reload
    at applet.c line 3076
  • #4 nma_icons_reload
    at applet.c line 3121
  • #8 <emit signal ??? on instance 0x1199ae0 [GtkIconTheme]>
    at /build/glib2.0-2.46.2/./gobject/gsignal.c line 3439
  • #9 0x00007f7ae165d474 in
  • #10 0x00007f7ae11d9588 in
  • #11 g_main_context_dispatch
    at /build/glib2.0-2.46.2/./glib/gmain.c line 3154
  • #12 g_main_context_dispatch
    at /build/glib2.0-2.46.2/./glib/gmain.c line 3769
  • #13 g_main_context_iterate
    at /build/glib2.0-2.46.2/./glib/gmain.c line 3840
  • #14 g_main_loop_run
    at /build/glib2.0-2.46.2/./glib/gmain.c line 4034
  • #15 main
    at main.c line 84
  • #0 g_type_check_instance_is_fundamentally_a
    at /build/glib2.0-2.46.2/./gobject/gtype.c line 4032
  • #1 g_object_unref
    at /build/glib2.0-2.46.2/./gobject/gobject.c line 3076
  • #2 nma_clear_icon
    at applet.c line 3066
  • #3 nma_icons_reload
    at applet.c line 3076
  • #4 nma_icons_reload
    at applet.c line 3121
  • #8 <emit signal ??? on instance 0x1199ae0 [GtkIconTheme]>
    at /build/glib2.0-2.46.2/./gobject/gsignal.c line 3439
  • #0 g_type_check_instance_is_fundamentally_a
    at /build/glib2.0-2.46.2/./gobject/gtype.c line 4032
  • #1 g_object_unref
    at /build/glib2.0-2.46.2/./gobject/gobject.c line 3076
  • #2 nma_clear_icon
    at applet.c line 3066
  • #1 g_object_unref
    at /build/glib2.0-2.46.2/./gobject/gobject.c line 3076
  • #0 g_type_check_instance_is_fundamentally_a
    at /build/glib2.0-2.46.2/./gobject/gtype.c line 4032
  • #1 g_object_unref
    at /build/glib2.0-2.46.2/./gobject/gobject.c line 3076
  • #2 nma_clear_icon
    at applet.c line 3066
  • #3 nma_icons_free
    at applet.c line 3076
$6 = 0x1199ae0 [GtkIconTheme]
(gdb) print applet->icon_layers[1]
$7 = (GdkPixbuf *) 0x7f7ae185190f
(gdb) print applet->icon_layers[0]
$8 = (GdkPixbuf *) 0x0
(gdb) print applet
$9 = 0x1199ae0 [GtkIconTheme]
(gdb) print applet->fallback_icon 
$10 = (GdkPixbuf *) 0x0
Comment 1 Thomas Haller 2016-02-24 19:02:07 UTC
fix in branch th/applet-icon-crash-bgo762421
Comment 2 Jiri Horner 2016-02-28 17:38:50 UTC
Hi guys,

I had similar crash with the same backtrace on debian sid. Your brach fixes the problem for me. Thanks!

There is still a failing assert (occurs basically when old applet crashed)

(nm-applet:4985): nm-applet-CRITICAL **: nma_icons_reload: assertion 'applet->isize > 0' failed

Probably needs to handle this gracefully?

For me, error occurs during screen reconfiguration.
Comment 3 Thomas Haller 2016-02-29 11:40:43 UTC
(In reply to Jiri Horner from comment #2)
> Hi guys,
> 
> I had similar crash with the same backtrace on debian sid. Your brach fixes
> the problem for me. Thanks!

Thanks for testing!


> There is still a failing assert (occurs basically when old applet crashed)
> 
> (nm-applet:4985): nm-applet-CRITICAL **: nma_icons_reload: assertion
> 'applet->isize > 0' failed
> 
> Probably needs to handle this gracefully?

Yes, this should be avoided. Strange that this can happen. Could you test the new patch on th/applet-icon-crash-bgo762421 and see if the CRITICAL is avoided?
Instead you should see a WARNING in status_icon_size_changed_cb() about "size > 0".

Thank you.
Comment 4 Thomas Haller 2016-02-29 12:44:33 UTC
(branch ACKed via IRC by lrintel and bengal)
Comment 5 Thomas Haller 2016-02-29 19:34:11 UTC
Branch merged to master as https://git.gnome.org/browse/network-manager-applet/commit/?id=65a594c0491fa1d0d27b6746222a8890fd04614a

@Jiri, if you stil see the CRITICAL or the WARNING, please report to investigate this further. Thanks.
Comment 6 Jiri Horner 2016-03-01 00:11:51 UTC
From quick testing, the issue seems fixed for me. Now I can't reproduce neither CRITICAL nor WARNING. Somehow strange (I was expecting WARNING), but whatever. Definitely segfault is fixed. Thanks again.
Comment 7 Thomas Haller 2016-03-01 07:48:51 UTC
(In reply to Jiri Horner from comment #6)
> From quick testing, the issue seems fixed for me. Now I can't reproduce
> neither CRITICAL nor WARNING. Somehow strange (I was expecting WARNING), but
> whatever. Definitely segfault is fixed. Thanks again.

Thanks. If you hit either CRITICAL or WARNING again, please report back because no warnings should be raised during a program run.