giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.39k stars 461 forks source link

Program doesn't open if icon is missing #1375

Open ignacio-reggiani opened 3 years ago

ignacio-reggiani commented 3 years ago

Version, Operative system CherryTree 0.99.22 on KDE Neon 5.20.3

Describe the bug I noticed Cherrytree wasn't starting with the system anymore and tried opening it through the GUI. Nothing happened. I entered cherrytree in the command line and got this error:

[2020-11-25 10:23:39.228] [   ] [debug] /home/[user]/.config/cherrytree/config.cfg parsed

(cherrytree:3350): Gtk-WARNING **: 10:23:39.244: Theme directory appsgray/scalable of theme korla-pgrey has no size field

(cherrytree:3350): Gtk-WARNING **: 10:23:39.256: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
[2020-11-25 10:23:39.265] [gtk] [critical] 
unhandled exception (type Glib::Error) in signal handler:
domain: g-io-error-quark
code  : 1
what  : Failed to load /home/[user]/.local/share/icons/korla-pgrey/categories/scalable/cherrytree.svg: Error opening file /home/[user]/.local/share/icons/korla-pgrey/categories/scalable/cherrytree.svg: No existe el archivo o el directorio

Which seems to indicate that the program is looking for an icon at a location where no such icon is present. I looked up that path and, indeed, the icon wasn't there. I tried a variant of the same icon theme and the same thing happened. Finally, I tried with Breeze (the system's default icon theme) and it opened again. I solved the problem by copying and pasting a "cherrytree.svg" icon from another theme in the directory the program was trying to look for one and it opened again.

However, I assume the program could have a fallback icon in case this happens.

To Reproduce

  1. Use an icon theme with no SVG version of the cherrytree icon at the path referenced above.
  2. Try to open the program.
  3. Program might not open; details if opened through command line

To be clear, I am no longer affected by the problem, but I submit this issue in case it's something that needs fixing on the side of Cherrytree.

ghost commented 3 years ago

Try this:


ln -s /usr/share/icons/hicolor/scalable/apps/cherrytree.svg ~/.local/share/icons/korla-pgrey/categories/scalable/cherrytree.svg
ignacio-reggiani commented 3 years ago

I deleted the icon I had manually placed there, tried that command and it works.

Although the icon on the title bar is different from the one on the task bar.

But it doesn't crash any more. Thanks!

ghost commented 3 years ago

Korla theme cannot include all application icons. It's up to the theme to look for missing icons @ /usr/share/icons/hicolor/scalable/apps/

txe commented 3 years ago

The program actually provides the icon, for some reason it wasn't used in your case. I can say more when I install kde in vm.