Closed bipface closed 1 year ago
I was affected by this bug multiple times but never knew that bin
is the problem (premake compiles deadbeef to bin/debug
or bin/release
by default).
Why it doesn't work? gdk (in this case) has external loaders to load icons (separate loaders for diff. image formats) and they are located in the lib
folder. When having bin
in the path glib expects to find the lib folder in the same folder as the bin
folder. Moving lib
folder 'fixes' the icon problem but the problem will persist in other areas (such as icon packs, themes and maybe more).
I tried several gtk environment variables (GTK_EXE_PREFIX
, GTK_DATA_PREFIX
, GDK_PIXBUF_MODULE_FILE
, ...) but I couldn't find the right solution for the problem. 😟
sounds like a gdk/glib limitation, should we close this as unfixable?
It might be possible to fix, either by the environment variables (I have no idea how), or by maybe restructuring deadbeef folder structure. Also possible that somebody more experienced will come up with other solution. It's hard for me to debug gtk related stuff and I couldn't find anything useful on the internet related to the issue (typical for me when looking up gtk stuff).
Looks like the relevant code is here: https://github.com/GNOME/gdk-pixbuf/blob/master/gdk-pixbuf/queryloaders.c#L335
Maybe the relevant function: https://github.com/GNOME/glib/blob/main/glib/gwin32.c#L274
If that directory's last component is "bin" or "lib", its parent directory is returned, otherwise the directory itself.
Seems like it is hardcoded, and it expects certain directory structure when installed under bin or lib folder, so it still seems quite unfixable to me without patching glib. There's an easy workaround though, so I don't see any big reason to keep it open.
Below is an option you can try (source) for DeaDBeeF version 1.9.6. Note you need the offset I used. I'm happy now. 😄
Load libglib-2.0-0.dll
(version 2.78.1.0) into a hex editor, find the "bin
" at around offset 0x129605
, and change that "bin
" to something else (that does not exist in the path).
@bipface
Steps to reproduce the problem
deadbeef-1.9.6-windows-x86_64.zip
).c:\bin\deadbeef-x86_64\...
).deadbeef.exe
.Only seems to occur when the GTK3 UI is active, GTK2 is unaffected.
Subfolders nested in any manner can trigger the issue (e.g.
c:\foo\bin\bar\deadbeef-x86_64\...
) so long as one of the components is named exactly "bin" (case-insensitive).Deadbeef version: 1.9.6 or the current 'devel' version at time of writing. OS: Windows 10 version 19045.3570
Details in Event Viewer:
UI with missing button icons: