Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg. #9936

Closed
krishna116 opened this issue Feb 6, 2020 · 5 comments
Assignees
Labels
category:question This issue is a question

Comments

@krishna116
Copy link

Describe the bug
When build and run a gtkmm application, show error message, the full error message is here:
(002-check-button.exe:9464): Gtk-WARNING **: Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg.
This may indicate that pixbuf loaders or the mime database could not be found.

Environment

  • OS: win10 x64
  • Compiler: vs2019 community.

To Reproduce

  1. ./vcpkg install gtkmm
  2. create a vs2019 console application, using this code:
    https://developer.gnome.org/gtkmm-tutorial/stable/sec-checkboxes.html.zh_CN
  3. build and run it, then click the check-button from this gui application, error happened.
@krishna116
Copy link
Author

I have two question:
1, I don't know why this file path is used (/org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg)
2, does it have no ability to load svg-files, as issue #8015 said?

@NancyLi1013
Copy link
Contributor

Hi @krishna116
I'm so sorry for the late reply.
Since I'm not familiar with this.
Hope the following issues can help you some.

Related issue #6554, #9127

https://gitlab.gnome.org/GNOME/gtk/-/issues/762

@NancyLi1013 NancyLi1013 added the category:question This issue is a question label Jul 23, 2020
@NancyLi1013
Copy link
Contributor

@krishna116

Please feel free to reopen this issue if it is still a problem for you.

@sousecreto1
Copy link

(English)

I solved this problem in my application as follows:
I ran my application created on Windows10 MSYS2, on Wine from Linux Mint.
In the terminal: "wine cmd"
"example_app_GTK.exe"
It returned me on the missing dlls, "librsvg-2-2.dll", "libxml2-2.dll", "liblzma-5.dll".
They were in the "bin" folder inside "mingw64", which is equivalent to: "/ usr / bin".
I copied the dlls to the bin folder of my app and the message "Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg" disappeared.
The first time I ran my app in the cmd of wine, the output was that the dlls "librsvg-2-2.dll and libxml2-2.dll" were missing, copied, executed, the same error message continued, but the output in cmd it showed that the dll "liblzma-5.dll" was missing, I copied it, executed it, and everything was perfect, without any more error messages.

(PT_BR)

Eu resolvi esse problema no meu aplicativo da seguinte forma:
Executei meu aplicativo criado no Windows10 MSYS2, no Wine do Linux Mint.
No terminal: "wine cmd"
"example_app_GTK.exe"
Me retornou na sáida que faltava as dlls, "librsvg-2-2.dll", "libxml2-2.dll", "liblzma-5.dll".
Elas estavam na pasta "bin" dentro "mingw64", que é equivalente a: "/usr/bin".
Copiei as dlls para a pasta bin de meu app e desapareceu a mensagem "Could not load a pixbuf from /org/gtk/libgtk/theme/Adwaita/assets/check-symbolic.svg".
Na primeira vez que executei meu app no cmd do wine, a saida foi que as dlls "librsvg-2-2.dll e libxml2-2.dll"estavam faltando, copiei, executei, a mesma mensagem de erro continuava, mas a sáida no cmd mostrava que faltava a dll "liblzma-5.dll", copiei, executei, e ficou tudo perfeito, sem mais mensagens de erros.

@edscott
Copy link

edscott commented Jun 13, 2023

After adding the dll's mentioned by sousecreto1, I am still getting the same message. So I added an svg image to my program to see any further explanation. And yes, I get the message that lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-svg.dll cannot be found.

There are various suspicious websites which offer to "fix" the problem. But the safe way is to install gimp for windows, then copy gimp\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-svg.dll to where gdk can find it.

Funny, this is not the directory where the program is being run.
In my case, I copied the dll to the subdir: lib\gdk-pixbuf-2.0\2.10.0\loaders and all svg images load properly.

Extra bonus: apparently gimp also has a dll to render windows meta files. I guess this could work to create GtkImage from any wmf. I have not tried this, as it is of no use to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

4 participants