Bug 358909 - Many icons missing (seeing placeholder) or even invisible
Summary: Many icons missing (seeing placeholder) or even invisible
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.4.1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-02-02 10:53 UTC by Bert
Modified: 2018-10-27 03:42 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot showing the problem, as requested (296.38 KB, image/png)
2016-02-02 14:32 UTC, Bert
Details
Digit not displayed (24.57 KB, image/png)
2016-02-15 11:46 UTC, Bert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bert 2016-02-02 10:53:40 UTC
I have customized my desktop and panel by using 'show a launcher when not running'and also by using my own .desktop files. Yesterday I changed some settings to get inkscape tooltips to be readable. After some experiments I got this working, and I can now (still) see the tooltips.

Unfortunately when I started my computer this morning, I saw many icons no longer had their own icon showing but a placeholder (an icon of something like an empty document). This was in the KDE launcher, but also the panel. Not for all icons.
Showing: konsole, ksnapshot, Chrome, Dolphin, system settings
Placeholder: Synaptic, Skype, Thunderbird, scudcloud
Totally invisible, but present and working: My own .desktop icons in the panel

The latter is very very strange as the full absolute path is in the .desktop file! I can display the .svg file with inkscape.

Reproducible: Always

Steps to Reproduce:
1. KDE/Plasma 5 starts
2. Some of the icons are totally missing, some have a placeholder icon, some are OK.
3. Change many themes, settings, whatever ...
4. Restart KDE or reboot
5. Still bad stuff

Actual Results:  
Some of the the icons are bad or missing, but clicking them always works.

Expected Results:  
I would like to get my icons back. I mean I *know* there are a couple of invisible icons on my panel, and I can use them, they do show tooltips too. Also, I can look at the tooltips to see which icon is which in the panel, and read the menu texts.

I have googled a lot now, and got tips ranging from setting everything to 'oxygen' to deleting all caches including the icon cache. I really tried every theme, look&feel, GTK2/3 setting, colors, .... nothing works.
Comment 1 Bert 2016-02-02 10:55:12 UTC
I run kUbuntu 15.10 (64 bits), and keep it 100% 'apt-get upgrade'd.
Comment 2 Bert 2016-02-02 10:58:33 UTC
Maybe interesting: when I type 'thunderbird' in the launcher, it will come up with the right menu entry. There is no placeholder, the icon is invisible (missing). When I do 'add to favorites', then it will show a placeholder icon.
Comment 3 Bert 2016-02-02 11:18:47 UTC
Another observation: Once the application runs, the icon does show in the task bar. So thunderbird, when started, has a proper thunderbird  icon in the task bar. When I close it, the launcher does not show the icon but a placeholder.

My own .desktop icons are invisible (empty) in the launcher. One of them starts a konsole with a specific color scheme. The konsole does come up with the right colors, but the icon in the task bar is not the one I made, but the general 'konsole' icon.
Comment 4 Aleix Pol 2016-02-02 14:16:08 UTC
Maybe a screenshot would help? I've never seen anything like that and I don't see how this can be reproduced...
Comment 5 Bert 2016-02-02 14:32:18 UTC
Created attachment 96980 [details]
Screenshot showing the problem, as requested

The invisible icons do get a tooltip and clicking on them does work ...
Comment 6 David Edmundson 2016-02-02 14:33:18 UTC
Does removing ~/.cache/icon-cache.kcache make a difference?
Comment 7 Bert 2016-02-02 14:35:22 UTC
I tried that, I actually removed everything with 'plasma in it from .cache, AND icon-cache.kcache ...
Comment 8 David Edmundson 2016-02-02 14:35:48 UTC
ok
Comment 9 Bert 2016-02-02 14:36:52 UTC
Oh and I first did 'init 3', to make sure KDE wasn't running anymore, then  a reboot. As I said, nothing seems to help.
Comment 10 Bert 2016-02-02 14:39:20 UTC
What strikes me most is that the .desktop files have a literal, full path:

...
Exec=konsole --profile Stable
Icon=/home/bert/kp/stbldevenv.svg
Terminal=false
...

% file /home/bert/kp/stbldevenv.svg
/home/bert/kp/stbldevenv.svg: SVG Scalable Vector Graphics image

How *can* it ignore that???
Comment 11 Bert 2016-02-15 11:46:58 UTC
Created attachment 97229 [details]
Digit not displayed

Here's another weird no-display Every 10 minutes, if the last digit of the time is a '9', it is not displayed.

Maybe not the same bug, but I'm stuck with a KDE that leaves out a lot of stuff: entire icons, digits, ... Why??
Comment 12 Alexis Murzeau 2016-06-11 20:07:08 UTC
I have the same bug on debian.
Using strace, I can see that kde appends ".png" and ".svg" to the path and try to find the icon using these paths (and it obviously doesn't work as the path is complete without modification needed).

For example, I have a .desktop file with "Icon=/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png".
Then dolphin try to find the icons like this:
stat("/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.png", 0x7ffd3b650050) = -1 ENOENT (No such file or directory)
stat("/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.svg", 0x7ffd3b650050) = -1 ENOENT (No such file or directory)
stat("/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.png", 0x7ffd3b650050) = -1 ENOENT (No such file or directory)
stat("/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.svg", 0x7ffd3b650050) = -1 ENOENT (No such file or directory)
stat("/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.png", 0x7ffd3b650050) = -1 ENOENT (No such file or directory)
stat("/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.svg", 0x7ffd3b650050) = -1 ENOENT (No such file or directory)
[... many times]


Using "Icon=/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon" (without .png) make it works, the icon is displayed in dolphin (and everywhere else this .desktop file is used)

Thanks
Comment 13 Bert 2016-06-12 08:42:21 UTC
Thanks Alexis! This is exactly what I needed. I have just made new .desktop's for all the tools without an icon: Thunderbird, Synaptic, Slack client, Skype ...

All I needed to do is make my own .desktop (usually simply copying the one from /usr/share), find a good icon image, and at least I can see a meaningful icon.

I conclude that there are at least 2 problems:

1) No check on existing extension (this caused my personal .desktop files to fail)
2) Some tools like Thunderbird have valid .desktops, but for some reason plasma cannot find it. This can be solved by hard-coding the path to the icon into the .desktop.

Anyway, I now managed to see meaningful icons for all the tools in the panel.
Comment 14 Alexis Murzeau 2016-06-15 19:17:56 UTC
I tracked down the faulty code with gdb and got:
#0  0x00007ffff78396d5 in __GI___xstat (vers=vers@entry=1, name=name@entry=0xd460a8 "/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.png", buf=buf@entry=0x7fffffffb440)
    at ../sysdeps/unix/sysv/linux/wordsize-64/xstat.c:35
#1  0x00007ffff253eb90 in stat64 (__statbuf=0x7fffffffb440, __path=0xd460a8 "/home/doc/Programmes/Musique/foobar2000/Foobar2000_Icon.png.png") at /usr/include/x86_64-linux-gnu/sys/stat.h:503
#2  QFileSystemEngine::fillMetaData (entry=..., data=..., what=..., what@entry=...) at io/qfilesystemengine_unix.cpp:480
#3  0x00007ffff24d2bd0 in QFileInfo::exists (file=...) at io/qfileinfo.cpp:703
#4  0x00007ffff24cae75 in QFile::exists (fileName=...) at io/qfile.cpp:431
#5  0x00007ffff24bcffb in QDir::exists (this=this@entry=0x7fffffffb6d0, name=...) at io/qdir.cpp:1809
#6  0x00007ffff2979c50 in QIconLoader::findIconHelper (this=this@entry=0x7ffff2d42420 <(anonymous namespace)::Q_QGS_iconLoaderInstance::innerFunction()::holder>, themeName=..., iconName=..., 
    visited=...) at image/qiconloader.cpp:284
#7  0x00007ffff297b80f in QIconLoader::loadIcon (this=0x7ffff2d42420 <(anonymous namespace)::Q_QGS_iconLoaderInstance::innerFunction()::holder>, name=...) at image/qiconloader.cpp:335
#8  0x00007ffff297ba20 in QIconLoaderEngine::ensureLoaded (this=this@entry=0xa696f0) at image/qiconloader.cpp:392
#9  0x00007ffff297bb9a in QIconLoaderEngine::ensureLoaded (this=0xa696f0) at image/qiconloader.cpp:386
#10 QIconLoaderEngine::virtual_hook (this=0xa696f0, id=1, data=0x7fffffffb870) at image/qiconloader.cpp:576
#11 0x00007ffff297dc78 in QIconEngine::availableSizes (this=<optimized out>, mode=<optimized out>, state=<optimized out>) at image/qiconengine.cpp:259
#12 0x00007ffff29704ae in QIcon::availableSizes (this=this@entry=0x7fffffffb8d0, mode=mode@entry=QIcon::Normal, state=state@entry=QIcon::Off) at image/qicon.cpp:1056
#13 0x00007ffff29739f0 in QIcon::fromTheme (name=..., fallback=...) at image/qicon.cpp:1190
#14 0x00007ffff74d829a in KStandardItemListWidget::pixmapForIcon (name=..., overlays=..., size=size@entry=48)
    at /build/dolphin-I_AGVN/dolphin-16.04.1/src/kitemviews/kstandarditemlistwidget.cpp:1449

-----------------------

The issue is that QIcon::fromTheme assume a icon name that follows freedesktop icon specification (http://doc.qt.io/qt-5/qicon.html#fromTheme).
There was a change in review in Qt now in abandoned state that would solve this issue: https://codereview.qt-project.org/#/c/149571

Anyway, according to the QIcon doc, I think that KStandardItemListWidget::pixmapForIcon should try to open the icon as absolute path :
- either before calling QIcon::fromTheme (but maybe only if its really an absolute path to avoid weird things when a icon in working dir as the same name as a theme icon name
- or after / as fallback icon (in pixmapForIcon, the fallback is already the "unknown" icon)
Comment 15 Andrew Crouthamel 2018-09-26 22:06:55 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 16 Andrew Crouthamel 2018-10-27 03:42:14 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!