GNOME Bugzilla – Bug 740119
fix crash in autostart file handling
Last modified: 2015-02-13 02:58:23 UTC
(from https://bugzilla.redhat.com/show_bug.cgi?id=1139685) Jeff Bastian 2014-09-09 08:49:03 EDT Description of problem: I just tried to login and it crashed and sent me back to lightdm. Version-Release number of selected component: gnome-session-3.13.3-2.fc21 Additional info: reporter: libreport-2.2.3 backtrace_rating: 4 cmdline: gnome-session crash_function: g_settings_schema_get_value executable: /usr/bin/gnome-session kernel: 3.16.2-300.fc21.x86_64 runlevel: N 5 type: CCpp uid: 1000 Truncated backtrace: Thread no. 1 (10 frames) #2 g_settings_schema_get_value at gsettingsschema.c:951 #3 g_settings_schema_key_init at gsettingsschema.c:1148 #4 g_settings_get_value at gsettings.c:1091 #5 g_settings_get_boolean at gsettings.c:1904 #6 setup_gsettings_condition_monitor at gsm-autostart-app.c:362 #7 setup_condition_monitor at gsm-autostart-app.c:550 #8 load_desktop_file at gsm-autostart-app.c:661 #9 gsm_autostart_app_initable_init at gsm-autostart-app.c:1374 #10 g_initable_new_valist at ginitable.c:228 #11 g_initable_new at ginitable.c:146 From the backtrace, I saw that thread 1 was trying to load /home/jmbastia/.config/autostart/vino-server.desktop. I moved that file out of the autostart directory and now Gnome starts. I see the vino-server.desktop file has a line: AutostartCondition=GSettings org.gnome.Vino enabled And the backtrace shows it was trying to read this value when it crashed: g_settings_schema_get_value It probably crashed because it does not exist: [jmbastia@firefly ~]$ gsettings get org.gnome.Vino enabled No such key 'enabled' Matthias Clasen 2014-11-14 07:17:20 EST the key was removed in https://git.gnome.org/browse/vino/commit/?id=18be3c5546172bce551b65d60ec2c931bc451398 together with the autostart file. Maybe gnome-session should be robust against autostart conditions referring to non-existing keys.
Created attachment 290712 [details] [review] autostart: validate autostart condition gsettings key gnome-session will crash if fed a desktop file with an autostart condition that references an invalid key for a given schema. This commit validates that the key associated with the autostart condition is defined in the schema and defined to have a boolean type.
Created attachment 290713 [details] [review] autostart: validate autostart condition gsettings key gnome-session will crash if fed a desktop file with an autostart condition that references an invalid key for a given schema. This commit validates that the key associated with the autostart condition is defined in the schema and defined to have a boolean type.
Attachment 290713 [details] pushed as 3442740 - autostart: validate autostart condition gsettings key
*** Bug 744322 has been marked as a duplicate of this bug. ***