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 740119 - fix crash in autostart file handling
fix crash in autostart file handling
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
: 744322 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-11-14 14:53 UTC by Ray Strode [halfline]
Modified: 2015-02-13 02:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
autostart: validate autostart condition gsettings key (3.97 KB, patch)
2014-11-14 14:53 UTC, Ray Strode [halfline]
none Details | Review
autostart: validate autostart condition gsettings key (4.18 KB, patch)
2014-11-14 14:59 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2014-11-14 14:53:35 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.
Comment 1 Ray Strode [halfline] 2014-11-14 14:53:37 UTC
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.
Comment 2 Ray Strode [halfline] 2014-11-14 14:59:19 UTC
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.
Comment 3 Ray Strode [halfline] 2014-11-14 15:00:20 UTC
Attachment 290713 [details] pushed as 3442740 - autostart: validate autostart condition gsettings key
Comment 4 Matthias Clasen 2015-02-13 02:58:23 UTC
*** Bug 744322 has been marked as a duplicate of this bug. ***