Bug 379324 - Deleting System-Fonts causes a freeze of systemsettings
Summary: Deleting System-Fonts causes a freeze of systemsettings
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fontinst (show other bugs)
Version: 5.10.0
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-28 19:16 UTC by martin
Modified: 2018-08-02 07:34 UTC (History)
2 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 martin 2017-04-28 19:16:12 UTC
System:
KDE Neon 5.9.5 (KDE Frameworks 5.33.0, QT 5.7.1, Kernel 4.4.0-63)

Overview:
Deleting System-Fonts with the Font Management of systemsettings5 causes a freeze of systemsettings5. The dialog with the message "please wait" stops at 100% and nothing happens.

Steps to reproduce:
1) Start Systemsettings
2) Start Font Management
3) Select System-Fonts Group
4) Select a font of your choice
5) click on delete and enter your root password

Actual Results:
systemsettings5 freezes

Expected Results:
systemsettings5 does not freeze

Additional information:
The bug does not occur on Manjaro Linux with Plasma 5.8
Comment 1 martin 2017-04-28 19:32:13 UTC
Starting from the console with "kcmshell5 fontinst" shows the following logging:

493407335 Connecting to session bus
1493407336 Using fontconfig file: "/home/martin/.fonts.conf"
1493407336 Need to refresh font lists
1493407336 update list of fonts
1493407336 "/etc/fonts//disabledfonts.xml"
1493407336 "/home/martin/.config//disabledfonts.xml"
1493407336 updated list of fonts
1493407336 3 20602
1493407336 Need to refresh font lists
1493407336 update list of fonts
1493407336 "/etc/fonts//disabledfonts.xml"
1493407336 "/home/martin/.config//disabledfonts.xml"
1493407336 updated list of fonts
1493407336 3 20602
1493407336 Need to refresh font lists
1493407336 update list of fonts
1493407336 "/etc/fonts//disabledfonts.xml"
1493407336 "/home/martin/.config//disabledfonts.xml"
1493407336 updated list of fonts
1493407345 Need to refresh font lists
1493407345 Flatten existing font lists
1493407345 update list of fonts
1493407345 "/etc/fonts//disabledfonts.xml"
1493407345 "/home/martin/.config//disabledfonts.xml"
1493407345 Look for differences
1493407345 Flatten, and take copies...
1493407345 Determine differences...
1493407345 Emit changes...
1493407345 Flatten, and take copies...
1493407345 Determine differences...
1493407345 Emit changes...
1493407345 updated list of fonts
1493407355 Need to refresh font lists
1493407355 Flatten existing font lists
1493407355 update list of fonts
1493407355 "/etc/fonts//disabledfonts.xml"
1493407355 "/home/martin/.config//disabledfonts.xml"                                                                
1493407355 Look for differences                                                                                     
1493407355 Flatten, and take copies...                                                                              
1493407355 Determine differences...
1493407355 Emit changes...
1493407355 Flatten, and take copies...
1493407355 Determine differences...
1493407355 Emit changes...
1493407355 updated list of fonts
1493407365 exiting
1493407365
1493407365 Need to refresh font lists
1493407365 Flatten existing font lists
1493407365 update list of fonts
1493407365 "/etc/fonts//disabledfonts.xml"
1493407365 "/home/martin/.config//disabledfonts.xml"
1493407365 Look for differences
1493407365 Flatten, and take copies...
1493407365 Determine differences...
1493407365 Emit changes...
1493407365 Flatten, and take copies...
1493407365 Determine differences...
1493407365 Emit changes...
1493407365 updated list of fonts
1493407375 Need to refresh font lists
1493407375 Flatten existing font lists
1493407375 update list of fonts
1493407375 "/etc/fonts//disabledfonts.xml"
1493407375 "/home/martin/.config//disabledfonts.xml"
1493407375 Look for differences
1493407375 Flatten, and take copies...
1493407375 Determine differences...
1493407375 Emit changes...
1493407375 Flatten, and take copies...
1493407375 Determine differences...
1493407375 Emit changes...
1493407375 updated list of fonts
1493407385 Need to refresh font lists
1493407385 Flatten existing font lists
1493407385 update list of fonts
1493407385 "/etc/fonts//disabledfonts.xml"
1493407385 "/home/martin/.config//disabledfonts.xml"
1493407385 Look for differences
1493407385 Flatten, and take copies...
1493407385 Determine differences...
1493407385 Emit changes...
1493407385 Flatten, and take copies...
1493407385 Determine differences...
1493407385 Emit changes...
1493407385 updated list of fonts
1493407395 exiting
1493407395
1493407395 Need to refresh font lists
1493407395 Flatten existing font lists
1493407395 update list of fonts
1493407395 "/etc/fonts//disabledfonts.xml"
1493407395 "/home/martin/.config//disabledfonts.xml"
1493407395 Look for differences
1493407395 Flatten, and take copies...
1493407395 Determine differences...
1493407395 Emit changes...
1493407395 Flatten, and take copies...
1493407395 Determine differences...
1493407395 Emit changes...
1493407395 updated list of fonts
1493407405 Need to refresh font lists
1493407405 Flatten existing font lists
1493407405 update list of fonts
1493407405 "/etc/fonts//disabledfonts.xml"
1493407405 "/home/martin/.config//disabledfonts.xml"
1493407405 Look for differences
1493407405 Flatten, and take copies...
1493407405 Determine differences...
1493407405 Emit changes...
1493407405 Flatten, and take copies...
1493407405 Determine differences...
1493407405 Emit changes...
1493407405 updated list of fonts
1493407415 Need to refresh font lists
1493407415 Flatten existing font lists
1493407415 update list of fonts
1493407415 "/etc/fonts//disabledfonts.xml"
1493407415 "/home/martin/.config//disabledfonts.xml"
1493407415 Look for differences
1493407415 Flatten, and take copies...
1493407415 Determine differences...
1493407415 Emit changes...
1493407415 Flatten, and take copies...
1493407415 Determine differences...
1493407415 Emit changes...
1493407415 updated list of fonts
1493407425 exiting
....

The logging seems to go on forever. After "updated list of fonts" it stops logging for about 15 seconds. Then it goes on with "exiting" and the always same logging-block.
Comment 2 Richard Chonak 2017-05-17 03:56:55 UTC
Same behavior on Linux Mint 18, with 
KDE Font Manager 1.0 (KDE Frameworks 5.28.0, Qt 5.6.1, xcb windowing)
Comment 3 martin 2017-06-03 13:31:15 UTC
This bug also occurs with Plasma 5.10.
If any further information is necessary or helpful to confirm this bug, please let me know.
Comment 4 Christoph Feck 2017-06-07 17:05:02 UTC
We currently have no fontinst maintainer to confirm where the bug is.
Comment 5 martin 2017-06-15 07:28:11 UTC
This is a pity. Are there any chances that this will change in the near future? Unfortunately, there are apparently 14 more bugs related to this component.
Comment 6 Mathias Tillman 2018-07-30 17:15:13 UTC
I have sent a review request that should fix this issue here: https://phabricator.kde.org/D14493

Please try the patch if you can and report back.
Comment 7 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 349673, 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 8 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 349673, 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