wxGTK (vcpkg): Error loading theme icon

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
shauser67
In need of some credit
In need of some credit
Posts: 4
Joined: Tue May 19, 2020 9:54 am

wxGTK (vcpkg): Error loading theme icon

Post by shauser67 » Thu May 21, 2020 8:34 am

Hi all,

I am having a strange problem after updating from Ubuntu 18.04 to 20.04 and installing the latest versions from vcpkg. When using a system dialog (e.g. wxMessageDialog) in my own program no GTK icons are shown and a number of warnings are displayed:
(polyklet:6767): Gtk-WARNING **: 10:01:56.991: Error loading theme icon 'gtk-no' for stock: Fatal error reading PNG image file: Invalid IHDR data

(polyklet:6767): Gtk-WARNING **: 10:01:56.991: Error loading theme icon 'gtk-yes' for stock: Fatal error reading PNG image file: Invalid IHDR data

(polyklet:6767): Gtk-WARNING **: 10:01:56.992: Error loading theme icon 'dialog-question' for stock: Fatal error reading PNG image file: Invalid IHDR data
There are no problems with other GTK programs. I am not sure if this problem is related to wxWidgets at all, maybe it is caused by the Ubuntu update or linking against an outdated library. These are the linked libraries:
wx_baseu-3.1 wx_gtk2u_adv-3.1 wx_gtk2u_aui-3.1 wx_gtk2u_core-3.1 wx_gtk2u_gl-3.1 wx_gtk2u_propgrid-3.1 wx_gtk2u_stc-3.1 wxregexu-3.1 atk-1.0 cairo gdk_pixbuf-2.0 gdk-x11-2.0 gio-2.0 glib-2.0 gobject-2.0 gthread-2.0 gtk-x11-2.0 pango-1.0 pangocairo-1.0 pangoft2-1.0
Of course I tried to google the error message, but I found no working solution for this problem.

Used versions: wxWidgets 3.1.3-1 (vcpkg) and libpng 1.6.37-9 (vcpkg).

Any help is greatly appreciated!

DavidHart
Site Admin
Site Admin
Posts: 3969
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wxGTK (vcpkg): Error loading theme icon

Post by DavidHart » Thu May 21, 2020 9:30 am

Hi,

FWIW, I couldn't reproduce the problem in a 20.04 virtualbox guest, testing the 'dialogs' sample built against the wx3.1.3 obtainable from this link.

As you say, there are various possible reasons, missing entries in the icon theme being my best guess (I had a similar problem testing AppImages on 20.04; certain icons have been removed from at least one of the standard themes). I suggest you experiment, with a self-built wx3.1.3 or with the above-mentioned packages; different themes...

Regards,

David

Post Reply