I'm writing simple gui application in c++ with, which use gtkmm. I have trouble with gtk functions, which uses std::string type. For example: when i use function Glib::get_real_name(), which returns std::string application crashes with message "Unhandled exception at 0x00007FF97FB8AFF4 (msvcr110d.dll) in app.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.". The same situation happens with other gtk functions, which returns std::string. There is also problem with some functions, which arguments are std::string for example create image from file cannot open proper picture (paths are correct..). There's no problem with functions, which are using ustring, but many built-in gtk functions uses std::string and they dont have ustring alternatives. It's seems to be problem with character encoding, but I dont know how to solve that. I'm using ms visual studio 2012. Have anyone of had this problem before or you know how to solve that?
0
votes
1 Answers
0
votes
std::string d = "1m.jpg";
Glib::RefPtr<Gdk::Pixbuf> image = Gdk::Pixbuf::create_from_file(d);
-> here i got this error in terminal: unhandled exception is signal handler: domain: g-file-error-quark code: 17 what : failed to open file '`p\u001f': Invalid Argument
it's seems that 1m.jpg is p\u001f for this app :D