Gtkmm Gdk::Pixbuf::create_from_file() crashes

1

I'm trying to load a Pixbuf from a file but Gdk::Pixbuf::create_from_file() crashes. Here is my code :

try {
    Glib::RefPtr<Gdk::Pixbuf> pix = Gdk::Pixbuf::create_from_file("a.png");
} catch(...) { /* never reached */ }

Unhandled exception at 0x65343566 (libgdk_pixbuf-2.0-0.dll) in myprog.exe: 0xC0000005: Access violation writing location 0x00000028.

I also tried to use Gdk::PixbufLoader but it crashes as well :

Glib::RefPtr<Gdk::PixbufLoader> loader = Gdk::PixbufLoader::create("png"); // crashes

// another try
Glib::RefPtr<Gdk::PixbufLoader> loader = Gdk::PixbufLoader::create(); // no problem
loader->write(mem, len); // blocks and uses 100% CPU

I'm using gtkmm-win32-devel-2.22.0-2.exe from https://wiki.gnome.org/Projects/gtkmm/MSWindows/ with MSVC++2012, and I had an issue with zlib1.dll : when I started my program, I had this message (translated from french) :

the ordinal 73 could not be found in the dynamic link library zlib1.dll

I replaced zlib1.dll and it seemed to work. I don't know if it is releated to my issue but it might be.

Do you have any clue to solve it ? Thanks for your replies.

c++
windows
visual-c++
gtk
gtkmm
asked on Stack Overflow Jul 24, 2014 by Eisenheim

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0