-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed can't get icon when installing wine app #282
Conversation
When cache->isValid() returns true, cache->reValid(true) will no longer be executed, resulting in gtkCachesWatcher->addPath no longer adding monitoring files, which cannot be monitored when icon-theme.cache changes.
I just added my problem reproduction environment in #260 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid this defeats the purpose of having a cache.
Also, see #255 (review) and #226
try adding debug info here to identify the problem:
|
Contrary to some comments, #261 had nothing to do with this. It was about consistency in treating dash fallbacks. Yes, this PR avoids the problem by not using the cache as it's supposed to be used, but in that case, the removal of the cache would be a cleaner "solution". Neither is a real solution (→ #226). |
Thank you, do you have any good suggestions for changes to delete the cache |
I didn't mean deleting the cache but ignoring it. Just remove it from But I emphasize again: Without the cache, each icon should be found in the directory hierarchies of icon sets, and that takes more CPU time. It's not disastrous — you might not notice a difference with your computer — but it isn't good for all. |
Whether it is possible to judge whether the cache needs to be updated by the result of cache->lookup instead of ignoring |
As I said in #226, the current code should do it; it uses Please read #226 and see how I was fooled into thinking that it was fixed (I closed and reopened the report). The problem definitely exists, in spite of watching the cache. |
My last desperate thoughts were #226 (comment). |
Ok, I have a good environment to reproduce the problem here, I am going to continue to find the cause of the problem from the cache, and if you have a good solution, I can help verify it. |
Very good. A short explanation: When the GTK icon cache changes (= is updated after app's installation), our watcher makes Now, the problem seems to be that, in the last stage, the new cache is valid but doesn't contain the icon. My guess is that (1) it's somehow related to how |
Yes, I also think there is no problem with the logic of QIconCacheGtkReader::reValid, but what I have encountered is that after all the wine applications are uninstalled and the wine application is installed again, I cannot receive this signal QFileSystemWatcher::fileChanged At this time there is no output printed here: |
BTW, every time we install and uninstall the wine application, icon-theme.cache is deleted and then recreated. |
That's how |
Thanks, after many tests, I found that the problem may still lie in addPath, especially when uninstalling multiple wine applications at one time, but I haven't found the reason yet |
Hi gents, after installing two identical machines with the one difference of using lubuntu 18.04 and lubuntu 22.04 it is very frustrating to see my wine apps having the correct icons in 18.04, but in 22.04 it appears I need to uninstall and reinstall them again :( Really hope that you can find a solution soon, thanks. |
Lubuntu 18.04 was using LXDE, Lubuntu 22.04 is using LXQt. |
@tsujan HI tsujan, Is it possible to consider monitoring the folder where icon-theme.cache is located instead of the icon-theme.cache file to solve this problem. |
The folder changes twice (at least): after the icon is installed/removed, and after the cache is updated.. Provided that we skip the first change(s) by checking the cache's modification time, we might get the current result with more computation — but it may be worth a try. If we don't skip the first change(s), it'll be like ignoring the cache and searching in the dir hierarchy — something we could have done from start if it was acceptable. |
I tried it; It didn't work. The result was the same as watching the cache file. |
This is not good news 😥,I will continue to try other methods to see if I can fix the problem. Feel free to contact me if you have any other fixes or need to verify the problem. Thank you. |
No, it isn't. We're in the dark as to why the problem happens. |
FYI, I also experimented with delaying the icon invalidation. Even with a 1-second delay, some icons weren't found. |
|
@Dami-star, see #226 (comment) Closing this because it isn't a real solution... |
Ok, I will use this scheme as a temporary scheme first, if I have a better scheme, I will open this and resubmit or apply for a pr |
When cache->isValid() returns true, cache->reValid(true) will no longer
be executed, resulting in gtkCachesWatcher->addPath no longer adding
monitoring files, which cannot be monitored when icon-theme.cache changes.
Even with 3.3.1, this fix still solves the problem