GNOME Bugzilla – Bug 780407
Masking upower.service makes mutter crash
Last modified: 2017-05-31 14:13:12 UTC
mutter-3.23.92-1.fc26.x86_64 Process 983 (gnome-shell) of user 42 dumped core. Stack trace of thread 983: #0 0x00007f3a8ee4a6b9 up_exported_daemon_get_lid_is_closed (libupower-glib.so.3) #1 0x00007f3a9ab88a75 meta_monitor_config_new (libmutter-0.so.0) #2 0x00007f3a9ab8e721 meta_monitor_manager_constructed (libmutter-0.so.0) #3 0x00007f3a96469a00 g_object_new_internal (libgobject-2.0.so.0) #4 0x00007f3a9646b2b5 g_object_newv (libgobject-2.0.so.0) #5 0x00007f3a9646ba74 g_object_new (libgobject-2.0.so.0) #6 0x00007f3a9ab7f5bb meta_backend_real_post_init (libmutter-0.so.0) #7 0x00007f3a9ac07c9f meta_backend_native_post_init (libmutter-0.so.0) #8 0x00007f3a9abbd326 meta_init (libmutter-0.so.0) #9 0x000055b0b992c1aa main (gnome-shell) #10 0x00007f3a945c85fe __libc_start_main (libc.so.6) #11 0x000055b0b992c5ba _start (gnome-shell) Something like this should fix it: diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c index e03b5cb6f..b2fd646a0 100644 --- a/src/backends/meta-monitor-manager.c +++ b/src/backends/meta-monitor-manager.c @@ -260,6 +260,9 @@ lid_is_closed_changed (UpClient *client, static gboolean meta_monitor_manager_real_is_lid_closed (MetaMonitorManager *manager) { + if (!manager->up_client) + return FALSE; + return up_client_get_lid_is_closed (manager->up_client); }
Created attachment 352952 [details] [review] monitor-manager: Fix crash when UPower is not available Don't access the upower client if it doesn't exist
Review of attachment 352952 [details] [review]: lgtm.
Attachment 352952 [details] pushed as f5f0ff0 - monitor-manager: Fix crash when UPower is not available