GNOME Bugzilla – Bug 789030
Segmentation fault after g_type_create_instance call on startup
Last modified: 2017-11-02 09:46:13 UTC
Created attachment 361643 [details] Stack trace Invoking the gnome-control-center process crashes with SEGFAULT when opening from the shell or UI. I have the following version of these components: Name : gnome-control-center Version : 3.26.1-1 Name : glib2 Version : 2.54.1-2 Example of shell output: [andre@scout ~]$ gnome-control-center (gnome-control-center:4018): GLib-GObject-WARNING **: invalid (NULL) pointer instance (gnome-control-center:4018): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed (gnome-control-center:4018): GLib-GObject-WARNING **: invalid (NULL) pointer instance (gnome-control-center:4018): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed (gnome-control-center:4018): libnm-CRITICAL **: ((libnm/nm-client.c:810)): assertion '<dropped>' failed Segmentation fault (core dumped) Please let me know what other details would be helpful.
Can you install debug symbols for gnome-control-center and NetworkManager and get a new stack trace?
Created attachment 361706 [details] Stack trace with debug symbols
(In reply to Rui Matos from comment #1) > Can you install debug symbols for gnome-control-center and NetworkManager > and get a new stack trace? Attached a new one. I built from the git master branch at commit 956532132. I still need to find and build network manager, but from what I get so far, looks like nm_client_get_devices() returns NULL and the segfault occurs when defering it at load_wifi_devices().
Created attachment 361707 [details] [review] Patch for prevent NULL deference Sorry for the message spam, I am still learning bugzilla. I'm attaching the diff that I made locally to NULL-check the return of nm_client_get_devices() to prevent the NULL deference. With this, gnome-control-center works fine, with the exception of the WiFi tab showing a frowny face saying "Oops something went wrong ... NetworkManager needs to be running". Which seems fair - I think I don't have NM running - I don't think I even installed it, at least explicitly. Could this be related with the NULL returned by the mn call?
Created attachment 361708 [details] Crash when clicking on the Network tab I spoke too soon. When I click on the Network tab, I got another segfault. Seems to be a similar issue. Adding call stack.
Created attachment 361711 [details] [review] Patch for prevent NULL deference Updating patch attachment to include NULL check on the result of nm_client_get_connections() when adding connections. With this, clicking on the network tab doesn't crash anymore. It shows that the NetworkManager needs to be running message. Previous versions of control center never gave me any troubles, and I don't believe I ever had NM installed on this system. Possibly in the past these nm_* calls would return a non-NULL pointer that would have ->len member set to 0, then those for loops would simply not execute. Maybe this issue is actually on the NM library that now returns NULL if NM is not running?
Not sure if I am supposed to change status?
(In reply to Andre Esteve from comment #6) > Possibly in the past these nm_* calls would return a non-NULL pointer that > would have ->len member set to 0, then those for loops would simply not > execute. Maybe this issue is actually on the NM library that now returns > NULL if NM is not running? Might be. What's you NM library version?
(In reply to Rui Matos from comment #8) > (In reply to Andre Esteve from comment #6) > > Possibly in the past these nm_* calls would return a non-NULL pointer that > > would have ->len member set to 0, then those for loops would simply not > > execute. Maybe this issue is actually on the NM library that now returns > > NULL if NM is not running? > > Might be. What's you NM library version? Name : libnm Version : 1.8.4-1 Description : NetworkManager client library
I updated today to gnome-control-center 3.26.2-1 and the issue is gone. libnm has been on 1.8.4-1 on my box since October, so likely not there where the issue was. Anyways, I think we can close this bug, since 3.26.2-1 doesn't crash. Thank you!
*** This bug has been marked as a duplicate of bug 788716 ***