Closed probonopd closed 4 years ago
Can you give some more context for this issue? Does that happen after a specific interaction? Just opening the settings is enough?
Right-click -> Settings. Then this appears.
I fixed a bug with the background image. There is the very small chance that it might have helped here already.
But I think the problem lies here:
The settings dialog assumes the system has icons for applications-system
, applications-accessories
and applications-graphics
, and also wxART_INFORMATION
which I'd have to look up what it resolves to. I assume one of those is missing. Solution would be to check for that, and then either show a fallback icon or none at all.
Yes, that's most likely what is going on. You can check with this command:
me@host:~$ sudo strace -f Downloads/Simdock-3aab011-x86_64.AppImage 2>&1 | grep share/icons | grep ENOENT > log.txt
(...)
[pid 8211] stat("/home/me/.local/share/icons/gnome/scalable/stock/chart", 0x7ffde7f0e3d0) = -1 ENOENT (No such file or directory)
[pid 8211] stat("/home/me/.local/share/icons/hicolor/scalable/stock/chart", 0x7ffde7f0e3d0) = -1 ENOENT (No such file or directory)
[pid 8211] stat("/home/me/.local/share/icons/gnome/scalable/stock/code", 0x7ffde7f0e3d0) = -1 ENOENT (No such file or directory)
...
I finally got annoyed by this and I think it is solved now. The two commits addressing this are: https://github.com/onli/simdock/commit/814afe4e87bd2028652586520ce72e7cdbdf05b0 and https://github.com/onli/simdock/commit/25c7482a699223d87ee10e4844e235c26ecc652c.
And because the main reason this lingered so long is missing information on the web on how to address missing icon problems like this in wxWidgets, some explanations here:
wxART_INFORMATION
and using this if the other icon is not IsOk()
. Note that if you want something that really always works you probably have to ship your own icon and load that. The get more icons part is not just doing a wxArtProvider::GetIcon
for the target size, but creating an wxArtProvider::GetIconBundle
instead and to get an icon from that, with wxIconBundle::FALLBACK_NEAREST_LARGER
as parameter. It did not help on my system, but maybe it would somewhere else.#define NDEBUG 1
early in your main. Might be a way to do that in your Makefile and trigger debug and production builds like that, but again that's not documented accessibly anywhere, and I wouldn't want it in the continuous AppImage build in any case. Note that I also checked which icon did not load, it's the one with the applications-accessories
, at least on my system. I have no idea why that one would be missing, it's a valid icon id listed in https://developer.gnome.org/icon-naming-spec/. Granted, it's possible that's not the spec to look at, but it's not like something else comes up when searching.
@probonopd: Thank you for the report!
I can confirm that the settings are now working in the AppImage :+1: Thanks @onli
On
neon-devedition-gitunstable-20180826-0812-amd64.iso
withSimdock-5fc553b-x86_64.AppImage
I get this error. Is it searching another hardcoded path?