Sublime Forum

Problem loading theme

#1

Recently Sublime Text cannot find the theme buttons although they exist:

(sublime_text:6786): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion `GDK_IS_PIXBUF (pixbuf)' failed

(sublime_text:6786): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion `GDK_IS_PIXBUF (pixbuf)' failed

** (sublime_text:6786): WARNING **: Pixbuf theme: Cannot load pixmap file /usr/share/themes/Adwaita/gtk-2.0/Buttons/button-pressed.png: Failed to load image '/usr/share/themes/Adwaita/gtk-2.0/Buttons/button-pressed.png': Fatal error in PNG image file: bad parameters to zlib


(sublime_text:6786): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion `GDK_IS_PIXBUF (pixbuf)' failed

(sublime_text:6786): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion `GDK_IS_PIXBUF (pixbuf)' failed

** (sublime_text:6786): WARNING **: Invalid borders specified for theme pixmap:
        /usr/share/themes/Adwaita/gtk-2.0/Buttons/button-pressed.png,
borders don't fit within the image
$ ls /usr/share/themes/Adwaita/gtk-2.0/Buttons/button-pressed.png
-rw-r--r-- 1 root root 450 23. Jul 14:23 /usr/share/themes/Adwaita/gtk-2.0/Buttons/button-pressed.png
0 Likes

#2

The same thing happened to me when I upgraded libpng 1.6.2 to 1.6.3.

What you should do is downgrade your libpng to the last working version, copy /usr/lib/libpng*.so to some directory (I used /opt/sublime-text/lib), and then upgrade again.

Then you should edit your Sublime Text starter script and add to it:
export LD_LIBRARY_PATH=/opt/sublime-text/lib, or whatever directory you used.

And your Sublime Text should be working now, using a private copy of an older libpng.

0 Likes

#3

Having issues with this on Arch. I issued the following commands for a downgrade and copy of the .so files:

sudo pacman -U /var/cache/pacman/pkg/libpng-1.6.2-3-x86_64.pkg.tar.xz
sudo cp /usr/lib/libpng*.so /opt/sublime-text/lib
sudo pacman -Syu

Then I edited the script in /usr/bin/subl to include:

LD_LIBRARY_PATH=/opt/sublime-text/lib

No effect. Opening the binary while the libpng is still downgraded certainly works, but as soon as I upgrade it package is broken again (doesn’t seem like it’s reading the right files).

I also tried exporting the LD_LIBRARY_PATH directly to the shell and still no go.

Not sure what I’m missing here.

Edit: Fixed it. I just copied over all the libpng* files, rather than just the ones that ended in .so. Final directory structure was:

tsuujin@arch> ls /opt/sublime-text/lib -la ~ total 2964 drwxr-xr-x 2 root root 4096 Jul 29 21:11 . drwxr-xr-x 5 root root 4096 Jul 29 20:52 .. -rw-r--r-- 1 root root 333056 Jul 29 21:11 libpng16.a -rwxr-xr-x 1 root root 216232 Jul 29 21:11 libpng16.so -rwxr-xr-x 1 root root 216232 Jul 29 21:11 libpng16.so.16 -rwxr-xr-x 1 root root 216232 Jul 29 21:11 libpng16.so.16.2.0 -rw-r--r-- 1 root root 333056 Jul 29 21:11 libpng.a -rwxr-xr-x 1 root root 216232 Jul 29 21:11 libpng.so -rw-r--r-- 1 root root 1484587 Jul 29 20:52 python26.zip

0 Likes

#4

Thanks!

Downgrading libpng from 1.6.3 to 1.6.2 solved the issue!

0 Likes

#5

I’m experiencing this problem I don’t have the option to downgrade to libpng 1.6.2. Using downgrade I’m able to downgrade libpng as far back as 1.6.6 only, the current version is 1.6.16. I’m using Sublime 2.0.2 x64.

Does anyone have any other workarounds?

0 Likes