Menu

#2498 Scite: use of deprecated API of gdk-pixbuf leads to errro message at startup

Bug
open
nobody
SciTE (663)
5
2026-02-08
2026-02-06
No

GTK+ 3.24.51, CRUX 3.8, Scite 5.5.8, gdk-pixbuf 2.44.5

While building Scite I see several deprecated warnings like the following:

Widget.cxx:214:57: warning: 'GdkPixbuf* gdk_pixbuf_new_from_xpm_data(const char**)' is deprecated [-Wdeprecated-declarations]
  214 |         UniquePixbuf pbGrey(gdk_pixbuf_new_from_xpm_data(xpmImage));

even though Scite builds fine, but at startup I see lots of errors and warnings, which is new to gdk-pixbuf 2.44.5. With version 2.44.4 I don't see the messages:

(scite:29244): GdkPixbuf-WARNING **: 11:01:30.620: gdk-pixbuf XPM module lacks XPM data capability
(scite:29244): GdkPixbuf-CRITICAL **: 11:01:30.620: gdk_pixbuf_add_alpha: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(scite:29244): GdkPixbuf-CRITICAL **: 11:01:30.620: gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(scite:29244): GdkPixbuf-CRITICAL **: 11:01:30.620: gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(scite:29244): GdkPixbuf-CRITICAL **: 11:01:30.620: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(scite:29244): GdkPixbuf-CRITICAL **: 11:01:30.620: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed

Scite is running after that, but all icons from the toolbar are missing.
I saw a similar behavior with gvim and reported this as a bug to gdk-pixbuf, see here:
https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/299

Thanks!

Discussion

  • Neil Hodgson

    Neil Hodgson - 2026-02-06

    It is up to your distribution whether GdkPixbuf is built with XPM support.

    I use Ubuntu (currently 25.10) which includes XPM support. These deprecation warnings do not appear for me on this system.

    SciTE uses XPM for toolbar buttons and search/replace pane option buttons. The toolbar can be changed to use stock system images with the toolbar.usestockicons=1 setting although some of these aren't great and this won't avoid the warnings.

    XPM makes it easy to include images inline in source code where it is certain that they can be found and avoids potential problems with loading images from files.

    If anyone is interested in working on this, the XPM format is quite simple and a replacement for gdk_pixbuf_new_from_xpm_data could be implemented inside SciTE. Scintilla already includes some XPM reading code (in scintilla/src/XPM.cxx from XPM::Init(...linesForm) but that only handles 1-byte-per-pixel XPMs and there are a couple of 2-bytes-per-pixel XPMs (close_xpm and replace_xpm in scite/gtk/pixmapsGNOME.h. It would be OK to replace these two images with simpler 1-byte-per-pixel versions.

    Please do not copy the LGPL implementation of gdk_pixbuf_new_from_xpm_data as its license is incompatible when copying source as opposed to linking dynamically.

    It would really be much simpler and more secure for the GTK project to re-enable XPM support instead of breaking downstream projects.

     
  • Juergen Daubert

    Juergen Daubert - 2026-02-08

    gdk-pixbuf on my system is build with XPM support. As I wrote already, this behavior is new with version 2.44.5, all versions until 2.44.4 and older are working without the warnings and errors.

     

Log in to post a comment.