Hicolor theme missing

Bug #333263 reported by LucaDC
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Krzysztof Kosinski

Bug Description

Just downloaded SVN 20757 and compiled.
Starting:

(inkscape.exe:3192): Gtk-WARNING **: Could not find the icon 'edit-select-all'.
The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
        http://icon-theme.freedesktop.org/releases

(inkscape.exe:3192): GLib-CRITICAL **: g_convert: assertion `str != NULL' failed

(inkscape.exe:3192): GLib-GIO-CRITICAL **: g_loadable_icon_load: assertion `G_IS
_LOADABLE_ICON (icon)' failed

And many icons are missing.

What's wrong?

Thanks.

Revision history for this message
Thomas Ibbotson (thomas-ibbotson) wrote :

I can confirm this happening on Windows with SVN 20757, but this doesn't happen for me on Ubuntu Intrepid with SVN 20757. On what OS do you have this issue?

Revision history for this message
LucaDC (lucadc) wrote :

Sorry for not reporting: my system is a WinXP SP3.

Revision history for this message
Thomas Ibbotson (thomas-ibbotson) wrote :

Also reported on the Inkscape-devel mailling list, so confirming this.

Changed in inkscape:
status: New → Confirmed
Changed in inkscape:
assignee: nobody → tweenk
status: Confirmed → In Progress
Revision history for this message
LucaDC (lucadc) wrote :

Please, tell me if I can do something manually to have latest SVN work on my system, while this problem is under analysis.
I keep downloading and recompiling new revisions but the icon-missing problem is always there.

If I'm the only one complaining for this, the problem could be related to my system: what can I do to check?

I'm stuck to SVN20697 as following revisions had a snapping bug fixed after the icon-missing problem appeared. I'm missing so many new improvements...

Thanks.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

I think this problem may be caused by an old copy of icons.svg somewhere on your system. Search for icons.svg and tell me whether you have any extra copies of that file. I'll try to debug this problem on Windows tomorrow.

Revision history for this message
LucaDC (lucadc) wrote :

I've already searched for icons.svg, both in my hard-disk and inside the registry to see if there was a key pointing to a different path.

Also when I have only one icons.svg (under \share\icons\) I still miss icons.
If I rename tango_icons.svg or legacy_icons.svg to icons.svg I lose almost all icons, so it seems that the correct file icons.svg is used (in a wrong way...).

I've also tried moving and renaming the Inkscape directory to different locations but the problem is always present. It seems that every executable looks only into his own directory tree, as is supposed to do.

I hope this helps you.
Thanks for your work.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Can you attach the icons.svg you're using?

Revision history for this message
LucaDC (lucadc) wrote :

It's the one downloaded from SVN.
See the attached file.
Thanks

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Your icons.svg seems up to date. I think I know what's going on: gtk_icon_theme_load_icon never returns NULL, it loads the "missing image" instead, so actually there is no fallback. Testing fix.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Looks like the fix was far more trivial, namely I didn't change some IDs in icons.svg. Please check whether revision 20821 fixes that for you.

Revision history for this message
LucaDC (lucadc) wrote :

Yes, 20821 seems to do part of the job. Thanks.

Anyway, starting from Inkscapec I still have this messages:

(inkscape.exe:2720): Gtk-WARNING **: Could not find the icon 'edit-select-all'.
The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
        http://icon-theme.freedesktop.org/releases

(inkscape.exe:2720): GLib-CRITICAL **: g_convert: assertion `str != NULL' failed

(inkscape.exe:2720): GLib-GIO-CRITICAL **: g_loadable_icon_load: assertion `G_IS
_LOADABLE_ICON (icon)' failed

Actually the hicolor theme is present (as downloaded from SVN) so I can't understand the complaining. The icon on the entry "select all" under the edit menu is present...
And I still miss the "No fill"-"No color" icon under the "Fill and Stroke" panel (the big black X).
I didn't check if other icons are missing but I thing there's already another bug open for this.

Thank you again for the fix.

Revision history for this message
LucaDC (lucadc) wrote :

Tanks for fixing the missing icon.
I've found another one under Object->Transform->Rotate.

Thank you.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Revision 20823 fixes the "no paint" icon. I have a potential fix for the warning spam but I haven't tested it yet.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

20824 fixes object->transform->rotate.

Revision history for this message
LucaDC (lucadc) wrote :

I've seen the missing "edit-select-all" icon that Inkscape is complaining for: it's in the upper left toolbar. It should be the same as the one present in the "Edit" menu: see attached images.

In other images you can find other missing icons and another problem: some icons seems to be rendered in a lower resolution (see in particular the "Align and Distribute" panel).
Good icons are from SVN20697.

Thanks.

Revision history for this message
LucaDC (lucadc) wrote :
Revision history for this message
LucaDC (lucadc) wrote :
Revision history for this message
LucaDC (lucadc) wrote :
Revision history for this message
LucaDC (lucadc) wrote :

Some other badly rendered icons.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

There are really four issues here:
1. Some missing IDs - all those you've mentioned are fixed in 20836
2. Silghtly blurry icons - Apparently the icons in icons.svg must be grid-aligned to be sharp (WTF!). Fixed in 20836 as well.
3. edit-select-all - this one's really weird because the icon on the select toolbar is supposed to be looked up with exactly the same name as the one in the menu. However, both those items should probably use GTK_STOCK_SELECT_ALL instead of a named icon.
4. Very blurry icons - icons are upscaled instead of being rendered again. This is an old bug which was present for a long time and my changes have made more visible. widgets/icon.cpp is a big pile of spaghetti so it isn't going to be easy to track down.

Revision history for this message
LucaDC (lucadc) wrote :

Thanks a lot for all the fixes!
Unfortunately now in the "Align and Distribute" dialog the other two icons are missing... :(

I supposed there was an alignment problem for the bad rendering but I don't know the format of icons.svg file so I didn't dare touching it to try. I assume every icon must be in some exact place, then the program extracts it from there. Is there some template about which/where icons shoud be?
As an Italian I like spagetti a lot, as a programmer I know they can be a headache. Good luck and let me know if I can help you in any way; I'd be glad to.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Revision 20847 should fix the two icons in Align and Distribute. Thanks for bearing with me.

icons.svg is just a big canvas that gets rendered in portions when an icon is needed. They are looked up by their IDs, which can be seen in Object Properties (Ctrl+Shift+O). The icons apparently need to be aligned on the 1px grid present in the document, otherwise they are blurry.

You can look into widgets/icon.cpp and places using SPIcon and try to figure out why they seem to reuse the pixbufs from different resolutions instead of rendering them anew, like what the code apparently tries to do.

Revision history for this message
Alvin Penner (apenner) wrote :

wrt to the missing icon "edit-select-all", I see that in the file \src\widgets\icon.cpp there is code like this:

static void setupLegacyNaming() {
    legacyNames["view-fullscreen"] = "fullscreen";
    legacyNames["edit-select-all"] = "selection_select_all";
    legacyNames["window-new"] = "view_new";
}

I guess this is to recognize the change in id. However, my question is, why is there no mention of the icon "deselect", because its id has also changed from 'selection_deselect' to 'edit-select-none'.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Alvin Penner: this is code says that "if edit-select-all is not found, try selection_select_all". The hicolor theme ships edit-select-all so this code is actually not necessary. It had some purpose when the IDs in icons.svg were not in sync with the freedesktop.org icon naming specification. It has no relation to the current problem however.

I think the problem is that I changed the verb for "Select All" to use a GTK stock icon and the code in select-toolbar.cpp doesn't take into account the fact that verb icons can also be GTK stock icons.

Revision history for this message
Alvin Penner (apenner) wrote :

this may be off-topic, but I see there is a shell script called
'update-makefiles.sh' in the hicolor directory.

as far as I know, this script will not run under Windows, does this matter?

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

update-makefiles.sh is only for updating the Linux build system. The Windows build system just copies everything so it doesn't need updates when a new icon is added.

Revision history for this message
Alvin Penner (apenner) wrote :

- running Windows nightly build 21165, I believe this has been fixed!
- could anyone else confirm this on a non-Windows build?

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

This problem did not exist in the Linux version.
I traced it back to the fact that index.theme for hicolor always exists in /usr/share/icons/hicolor on Linux, but it doesn't exist on Windows. The first good revision is 21161.

Changed in inkscape:
status: In Progress → Fix Released
Revision history for this message
Alvin Penner (apenner) wrote :

thanks Krzysztof, it's great to see that message gone forever!

su_v (suv-lp)
tags: added: ui-dialogs-toolbars
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.