Bug 361960 - kfontinst freezes adding fonts to system
Summary: kfontinst freezes adding fonts to system
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fontinst (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
: 357337 371772 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-04-19 11:10 UTC by Enol P.
Modified: 2018-08-02 07:34 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enol P. 2016-04-19 11:10:38 UTC
Font installer freezes on "Updating font configuration. Please wait..." dialog when you try to install whatever font to system, not to an user. The indicator icon keeps spinning all time and if you press Cancel button, nothing happens. The window keeps freeze even if you press the closing X.

However, the font installation is successful.

I'm using OpenSUSE Tumbleweed.

Reproducible: Always

Steps to Reproduce:
1. Download a font from Internet
2. Install it as a system font
3. Wait for the freeze

Actual Results:  
kfontinst freezes on "Updating font configuration. Please wait..." dialog trying to install a font to system.

Expected Results:  
kfontinst should install fonts to system succesfully without any freezes.
Comment 1 Christoph Feck 2016-06-14 20:51:11 UTC
Are you still seeing this issue? It could be a duplicate of bug 345234, which has since been fixed.
Comment 2 Enol P. 2016-06-14 21:02:48 UTC
(In reply to Christoph Feck from comment #1)
> Are you still seeing this issue? It could be a duplicate of bug 345234,
> which has since been fixed.

This issue still persists, i have just checked it
Comment 3 Mark Pearson 2016-06-24 11:02:05 UTC
I am seeing the same problem on Kubuntu 16.04 exactly as described in the initial bug report
Comment 4 orbayo 2016-09-20 11:38:26 UTC
Install new fonts makes very slow system, as root (make system useless) or as a user. Making a manual installation or with system settings. KDE 5 BUG.

I copied my folder with my collection of type fonts on the route

/usr/share/fonts/personalfonts

Now the whole system is super slow, my opensuse 42.1 KDE 5.5 is now useless.

I tried to do it with systemsettings5 and the same problem.  If you install the fonts only for a single user the laggy is less. And the same problem with Linux Mint KDE 18. 

if you add new fonts you  lose the system, I need the fonts to work .
If you delete the installed fonts you recover the system speed.
Comment 5 Michael K. 2016-12-16 15:10:26 UTC
I am experiencing the same issue. ("Updating font configuration. Please wait..." dialog hangs forever and can't be closed)

This happens when I try to install or delete a font system wide.

Arch Linux, plasma 5.8.4.
Comment 6 Michael K. 2016-12-16 15:23:12 UTC
I played with it a little bit more. This bug does not occur every time. Sometimes it does, sometimes it does not.
Comment 7 Tristan Miller 2017-04-03 09:46:21 UTC
Possible duplicates: Bug 357337 (possibly filed to the wrong product/component), Bug 371772
Comment 8 Tristan Miller 2017-04-03 09:56:05 UTC
As a workaround, you can use kdesu (or su -) to launch kfontinst from the command line, passing as arguments the filenames of the fonts you want to install:

$ kdesu kfontinst somefont.otf
Comment 9 Christoph Feck 2017-04-21 02:09:26 UTC
*** Bug 371772 has been marked as a duplicate of this bug. ***
Comment 10 Christoph Feck 2017-04-21 02:10:17 UTC
*** Bug 357337 has been marked as a duplicate of this bug. ***
Comment 11 Tristan Miller 2018-05-20 12:01:09 UTC
I can confirm that:

1) The problem still exists with Plasma 5.12.5

2) The problem occurs not just for installing fonts, but also uninstalling fonts

3) The workaround I posted in Comment #8 works only for installing fonts, not for uninstalling fonts.  (It seems there is no command-line tool for uninstalling fonts.)
Comment 12 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 349673, 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 13 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 349673, 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