Bug 128523 - clear per user icon cache (holding icons for SVG and at scaled UI) at least once during an upgrade installation
Summary: clear per user icon cache (holding icons for SVG and at scaled UI) at least o...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
6.3.1.1 rc
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Mike Kaganski
URL:
Whiteboard: target:7.0.0 target:6.4.0.1
Keywords: needsDevEval
Depends on:
Blocks: Icon-Themes-Code
  Show dependency treegraph
 
Reported: 2019-10-31 23:11 UTC by skierpage
Modified: 2020-06-03 13:10 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skierpage 2019-10-31 23:11:03 UTC
I am running LibreOffice 6.3.1 after numerous updates from 5.x onwards and have had terrible-looking blacked-out icons for months despite those updates (as I recall each time I downloaded and ran the latest Windows installer). Today I learned from bug 119020 that the fix is to delete the various icon folders in %appdata%\LibreOffice\4\cache\<your icon theme name> folders (I opened each folder, every icon theme folders had a folder named "150" inside which I deleted).

This worked great and finally the icons look good, but very few LO users have the knowledge to do this so many long-time users are experiencing ugly icons.

In bug 119020 comment #56 Robert Berg in wrote:
> Yes, deleting the cache folder is enough to fix it, and deleting the cache
> folder of a user not having the issue seems to have no negative effects
> except a few extra milliseconds next launch. However, most users who aren't
> tech inclined aren't going to know to delete the cache folder to fix their
> icons. Maybe the 6.2.0 installer/updater can have a one-time delete cache
> folder routine, so everyone starts fresh?

He is right, please add this fixup to the installer.
Comment 1 V Stuart Foote 2019-11-01 15:01:33 UTC
While it might be possible to craft a Windows build MSI custom action to remove the icon cache for installation of a single user system, seems unlikely to work on a multi-user install--so probably could not be done in the installation packaging.

And, kind of seems like it would be useful cross platform--assure changed (or corrected as for OP) icon themes are parsed/rebuilt at least at a major release install. 

Without forcing users to fully reset profile, could per user clearing of the icon cache be forced for an initial launch of a new major release? Perhaps using the same ooSetupLastVersion test used for the What's new infobar (bug 69042).
Comment 2 Mike Kaganski 2019-11-01 15:50:37 UTC
FTR:LibreOffice auto-restarts on the first start after an upgrade.
Comment 3 Mike Kaganski 2019-11-18 22:56:54 UTC
https://gerrit.libreoffice.org/83138
Comment 4 Commit Notification 2019-11-19 06:48:01 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2d2a76dd0ada087c168134c0a873e0f9a98eea05

tdf#128523: drop cache directory when restart manager initiates restart

It will be available in 6.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Heiko Tietze 2019-11-19 07:12:36 UTC
How about backporting to 6.4 to have some live testing soon?
Comment 6 Commit Notification 2019-11-19 09:17:56 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/bced052ae28a3cafbe4cd0538cefc9a37f80094f

tdf#128523: drop cache directory when restart manager initiates restart

It will be available in 6.4.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 V Stuart Foote 2019-11-19 13:44:57 UTC
So this removes the per user cache directory so removing the scaled icons (if any).

But clearing the cache also clears cache of the the OpenGL shaders and the OpenGL/OpenCL configuration logs. An added benefit? Or, potential issues?
Comment 8 Mike Kaganski 2019-11-19 14:58:58 UTC
(In reply to V Stuart Foote from comment #7)
> But clearing the cache also clears cache of the the OpenGL shaders and the
> OpenGL/OpenCL configuration logs. An added benefit? Or, potential issues?

Possibly a matter to discuss. Personally I think that removal of shaders is not a problem (and possibly even a benefit); but storing logs in a cache directory is unfortunate and should be moved to user directory.