Unless gedit is installed, "Appearance" causes control center to crash

Bug #1947519 reported by Piotr Mitana
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Fix Released
Low
Gunnar Hjalmarsson
Impish
Triaged
Low
Unassigned

Bug Description

Ubuntu 21.10. Gedit not installed from deb (I use a Flatpak version).

Steps to reproduce:

- sudo apt remove gedit
- sudo apt autoremove
- gnome-control-center ubuntu

Expected: control center opens with Appearance tab shown
Experienced: nothing happens, log in terminal:

(gnome-control-center:27462): GLib-GIO-ERROR **: 22:03:20.416: Settings schema 'org.gnome.gedit.preferences.editor' is not installed

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: gnome-control-center 1:40.0-1ubuntu5
ProcVersionSignature: Ubuntu 5.13.0-19.19-generic 5.13.14
Uname: Linux 5.13.0-19-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu70
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sun Oct 17 21:57:23 2021
InstallationDate: Installed on 2021-06-30 (109 days ago)
InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
SourcePackage: gnome-control-center
UpgradeStatus: Upgraded to impish on 2021-10-15 (1 days ago)

Revision history for this message
Piotr Mitana (pmitana) wrote :
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

This is due to Allow-tweaking-some-settings-for-Ubuntu-Dock.patch. Making g-c-c depend on gedit-common is one way to fix it. (AFAIU gedit itself does not need to be installed.)

Changed in gnome-control-center (Ubuntu):
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Handling missing schemas without crashing is still possible, just not elegant, in the gsettings API.

Revision history for this message
Piotr Mitana (pmitana) wrote :

Actually gedit-common triggers gedit install as well:

```
The following additional packages will be installed:
  gedit gir1.2-gtksource-4 gir1.2-peas-1.0 libgtksourceview-4-0 libgtksourceview-4-common libpeas-1.0-0 libpeas-common python3-gi-cairo
Sugerowane pakiety:
  gedit-plugins
Zostaną zainstalowane następujące NOWE pakiety:
  gedit gedit-common gir1.2-gtksource-4 gir1.2-peas-1.0 libgtksourceview-4-0 libgtksourceview-4-common libpeas-1.0-0 libpeas-common python3-gi-cairo
```

Still, isn't it a bit weird, that changing the wallpaper requires a particular text editor to be installed? Would it be too complicated to make the gnome-control-center independent of the gedit's schema?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2021-10-18 11:46, Piotr Mitana wrote:
> Actually gedit-common triggers gedit install as well:

Yes, but you can uninstall gedit afterwards. Or:

sudo apt install --no-install-recommends gedit-common

> Still, isn't it a bit weird, that changing the wallpaper requires a
> particular text editor to be installed? Would it be too complicated
> to make the gnome-control-center independent of the gedit's schema?

It's not for the wallpaper stuff, but for the Dock stuff below that.

Can't tell how difficult it would be to change it to not use gedit's schema.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2021-10-18 11:34, Daniel van Vugt wrote:
> Handling missing schemas without crashing is still possible, just
> not elegant, in the gsettings API.

I see. OTOH I suppose we want the UI to work as expected, not only prevent the crash.

So without changing the patch, it looks to me as if letting g-c-c depend on gedit-common is a reasonable step. With your blessing I could commit that change.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

For the record: Using gedit's schema was introduced recently through this upload:

https://launchpad.net/ubuntu/+source/gnome-control-center/1:40.0-1ubuntu4

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
Changed in gnome-control-center (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
status: Triaged → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That doesn't look like a fix. You can prevent a program from crashing/exiting when a schema is missing, but I forget the exact API changes required.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Not sure what you mean by that, Daniel. By letting g-c-c depend on gedit-common, we make sure that the schema is never missing. If a user uninstalls gedit, gedit-common won't be uninstalled via "apt autoremove". Hence there is no need to figure out how to handle a missing schema graciously, is it?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You're creating a dependency that doesn't need to exist. All we need to do is handle the case when the schema is missing with a little code change.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I assumed that the patch was changed in version 1:40.0-1ubuntu4 for a reason, which made it natural to me to add the dependency.

I understand that an alternative solution is to change it so it falls back to the previous behavior if the schema is missing. Please feel free to do that instead and drop the dependency.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:41.1-1ubuntu1

---------------
gnome-control-center (1:41.1-1ubuntu1) jammy; urgency=medium

  * Resynchronize with debian and update to the new serie

 -- Sebastien Bacher <email address hidden> Tue, 16 Nov 2021 13:37:15 +0100

Changed in gnome-control-center (Ubuntu):
status: In Progress → Fix Released
Jeremy Bícha (jbicha)
Changed in gnome-control-center (Ubuntu Impish):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Want to mention that we currently have a belt-and-braces solution in jammy. There is both my simplistic dependency:

https://salsa.debian.org/gnome-team/gnome-control-center/-/commit/f685f0a6

And then Marco's fix which makes the just mentioned dependency unneeded:

https://salsa.debian.org/gnome-team/gnome-control-center/-/commit/03b09851

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.