Bug 349673 - kcm_fontinst: Backend crashes on systemwide fonts installations
Summary: kcm_fontinst: Backend crashes on systemwide fonts installations
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fontinst (show other bugs)
Version: 5.3.1
Platform: Slackware Linux
: NOR major
Target Milestone: ---
Assignee: Craig Drummond
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2015-06-27 22:43 UTC by sombragris
Modified: 2018-08-02 07:34 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.14.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sombragris 2015-06-27 22:43:55 UTC
When in Systemsettings, installing fonts systemwide has a problem. Upon selecting more than one font (let's say it's a family of regular, italic, bold and bold-italic) after the installation of the first font, there is a dialog thatr appears saying: "backend died, but it has been restarted. Please try again". 

The result is that one of the four fonts has been installed, and then you must repeat the procedure for all the rest, which is extremely cumbersome.

Reproducible: Always

Steps to Reproduce:
1. launch kcmshell5 fontinst
2. install more than one font at the time, systemwide
3. You get the "backend crashed" message box

Actual Results:  
Only one font is installed and the process is interrupted with an error message.

Expected Results:  
fontinst should have installed all fonts

I just tried with the systemwide settings.
Comment 1 Christoph Feck 2015-09-23 14:12:52 UTC

*** This bug has been marked as a duplicate of bug 345234 ***
Comment 2 chris.taylor 2015-10-30 11:26:34 UTC
Confirmed also on Kubuntu 15.10.
Comment 3 Walter Nicholls 2016-04-18 04:33:08 UTC
This bug is NOT a duplicate of bug 345234 !

I also confirm still a problem on Kubuntu 15.10 - fully up-to-date. Two separate computers. Attempt to install 2 of more fonts systemwide - asks for sudo and then crashes on the second font. 1. Add 2. Select two TTF files 3. "Do you wish to install the font(s) for personal use (only available to you), or system-wide (available to all users)?" - select SYSTEM 4. "Modifying the system-wide font configuration requires privileges." - enter password and OK 5. "Error Backend died, but has been restarted. Please try again." observed - first font in selection has been expected - no error message at (5) and all fonts installed at once. This bug reported in 2015 but I'm pretty sure it was going on years before that. (I don't install fonts very often). 

Apparently this is still a problem in Plasma 5.6.2.  
*** NO IT IS NOT RESOLVED BY ANY STRETCH OF THE IMAGINATION !!!! ***
Comment 4 Walter Nicholls 2016-04-18 04:38:47 UTC
I hope someone with the rights to reopen this bug can reopen it.   If I search KDE bugs for the string "backend died, but it has been restarted"  this is the only entry I can find.
Comment 5 gotang 2016-04-18 11:13:01 UTC
I can also confirm that this bug still exists under Fedora FC23, running KDE Plasma 5.5.5. Exactly as described.

This bug has NOT been fixed yet.
Comment 6 Wolfgang Bauer 2016-04-18 12:01:50 UTC
Still happens here too on openSUSE 13.2 with Qt 5.6.0, KDE Frameworks 5.21.0 and Plasma 5.6.2, as mentioned in the other bug report.

And I agree that this is not a duplicate, I'm reopening it therefore, as I happen to have the necessary rights ;-) ...

To clarify:
- if you install multiple fonts at once, the "backend dies" after successfully installing the first one. It is being restarted and successfully installs the third one again too (but not the fourth one).
- doing the same with installing as "Personal Fonts" works.
- installing only one font system-wide works here, since bug#345234 has been fixed.
Comment 7 Wolfgang Bauer 2016-04-18 12:27:16 UTC
Another observation that *may* be helpful in finding the cause:
- it seems to work fine if you install one font system-wide, and then click "Add..." again and install another one.
Comment 8 Kenneth 2016-04-23 22:10:58 UTC
With 16.04 (64-bit), I observed this and could not install an individual font. One font did get installed when selecting 4 fonts. But in either case, and without the backend died message,  the installing window states "Updating font Configuration, Please Wait..." --which goes on forever. I have to pull the plug to end the process as System Monitor does nothing. I even tried re-installing Kubuntu, but the same thing happens.
Comment 9 Wolfgang Bauer 2016-04-26 20:07:52 UTC
(In reply to Kenneth from comment #8)
> With 16.04 (64-bit), I observed this and could not install an individual
> font. One font did get installed when selecting 4 fonts. But in either case,
> and without the backend died message,  the installing window states
> "Updating font Configuration, Please Wait..." --which goes on forever. I
> have to pull the plug to end the process as System Monitor does nothing. I
> even tried re-installing Kubuntu, but the same thing happens.

No, what you see is bug#345234, which should be fixed, and I cannot reproduce this any more.
But somebody else has filed the same problem again, see bug#361960.

Again, this bug report is about the backend crashing when installing more than one font.
The two might be related though, or not.
Comment 10 Stephan van den Akker 2016-12-29 15:16:49 UTC
I can confirm this in:
OpenSuSE 13.2 (64-bit), KDE Development Platform 4.14.9
Kubuntu 16.04 (32-bit), version 1.0, KDE Frameworks 5.18.0, QT 5.5.1
OpenSuSE Leap 42.2 (64-bit), KDE Frameworks 5.26.0, QT 5.6.1
OpenSuSE Tumbleweed 20161226 (64-bit), KDE Frameworks 5.29.0, QT 5.7.1
Comment 11 martin 2017-03-01 19:21:18 UTC
I can confirm this bug on KDE Neon with Plasma 5.9.3.
Deleting one or many fonts also results in a crash or (in some cases) a systemsettings freeze. If you kill the systemsettings5-process because of the freeze, the font-configuration table is empty afterwards.
Comment 12 Øystein Steffensen-Alværvik 2018-01-31 09:18:44 UTC
Confirmed on KDE Neon 5.11.95 (dev stable with updates as of 31/1) and Neon LTS 5.8.8. Steps to reproduce are the same as in the first bug comment.
Comment 13 Walter Nicholls 2018-02-21 21:29:11 UTC
Hit this in Kubuntu 17.10 today. <sigh> I had ten fonts to install, all it took was " sudo cp *.otf /usr/share/fonts/opentype/ "
Comment 14 Mathias Tillman 2018-07-31 10:41:02 UTC
Git commit 60c895758f20bd2cb17ab12e57cf34cc37197098 by Mathias Tillman.
Committed on 31/07/2018 at 10:40.
Pushed by mathiastillman into branch 'master'.

fontinst quits after KJob is done

Summary:
As the summary says, when installing/removing multiple fonts to system the expected behaviour would be for fontinst to keep running after the first font has been installed or removed, instead it quits which causes a bunch of issues. fontinst uses KJob to authorize and internally KJob uses a QEventLoopLocker which causes the main event loop to quit when it's done.
I'm not entirely sure why the event loop locker is enabled by default for KJob, but the patch I have attached works around this by completely disabling that functionality for fontinst. There's a timer that runs in the background which checks for any connected clients, so it will quit after a little while regardless.
Related: bug 379524, bug 379324, bug 361960, bug 392267

Test Plan: Make sure fonts are still installed and removed properly.

Reviewers: #plasma, dfaure, aacid, gateau

Reviewed By: dfaure

Subscribers: wbauer, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14493

M  +4    -0    kcms/kfontinst/dbus/Main.cpp

https://commits.kde.org/plasma-desktop/60c895758f20bd2cb17ab12e57cf34cc37197098
Comment 15 Øystein Steffensen-Alværvik 2018-07-31 11:02:58 UTC
Very good!
Comment 16 Mathias Tillman 2018-08-02 07:34:42 UTC
Git commit 690570a4cefd786db5113ca237e9bdb48cd50812 by Mathias Tillman.
Committed on 02/08/2018 at 07:33.
Pushed by mathiastillman into branch 'Plasma/5.12'.

fontinst quits after KJob is done

Summary:
As the summary says, when installing/removing multiple fonts to system the expected behaviour would be for fontinst to keep running after the first font has been installed or removed, instead it quits which causes a bunch of issues. fontinst uses KJob to authorize and internally KJob uses a QEventLoopLocker which causes the main event loop to quit when it's done.
I'm not entirely sure why the event loop locker is enabled by default for KJob, but the patch I have attached works around this by completely disabling that functionality for fontinst. There's a timer that runs in the background which checks for any connected clients, so it will quit after a little while regardless.
Related: bug 379524, bug 379324, bug 361960, bug 392267

Test Plan: Make sure fonts are still installed and removed properly.

Reviewers: #plasma, dfaure, aacid, gateau

Reviewed By: dfaure

Subscribers: wbauer, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14493

(cherry picked from commit 60c895758f20bd2cb17ab12e57cf34cc37197098)

M  +4    -0    kcms/kfontinst/dbus/Main.cpp

https://commits.kde.org/plasma-desktop/690570a4cefd786db5113ca237e9bdb48cd50812