GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Aug 31, 2016 4:01 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: help on gdk_pixbuf_new_from_file crash
PostPosted: Fri Apr 27, 2012 2:22 pm 
Familiar Face

Joined: Tue Dec 20, 2011 3:27 pm
Posts: 14
Hi all,

i hae the following function, that is called 2 or more times, everytime a new window is created and it needs an icon:

GdkPixbuf * AppIcon::CreateIcon ()
   utils::Sys s;

   GdkPixbuf *pixbuf;
   GError *error = NULL;

   string icon = s.GetProgramPath() + "../res/icon.png";

-->   pixbuf = gdk_pixbuf_new_from_file (icon.c_str(), &error);

   if (!pixbuf)
      fprintf(stderr, "%s\n", error->message);
   return pixbuf;

The second time "gdk_pixbuf_new_from_file" is called i get the following crash (SIGABRT):

#0 (   0xb7fe2424 in __kernel_vsyscall() (??:??)
#1 0xb716e8f1   *__GI_raise(sig=6) (../nptl/sysdeps/unix/sysv/linux/raise.c:64)
#2 0xb7171d22   *__GI_abort() (abort.c:92)
#3 0xb73fc195   ??() (/lib/i386-linux-gnu/
#4 0xb746d6c9   g_private_set() (/lib/i386-linux-gnu/
#5 0xb740fdb2   g_get_filename_charsets() (/lib/i386-linux-gnu/
#6 0xb74104ce   g_filename_display_name() (/lib/i386-linux-gnu/
#7 0xb7749f78   gdk_pixbuf_new_from_file() (/usr/lib/i386-linux-gnu/
#8 0x80a1bdd   AppIcon::CreateIcon(this=0x817df68) (src/ui/
#9 0x80a1f27   Window::SetTitle(this=0x817df68, title=...) (src/ui/
#10 0x80a281a   Container::Container(this=0x817df18) (src/mo/
#11 0x8092304   XmlObjects::ReadContainer(this=0x80cfd60, xml=..., n=0x814a920) (src/
#12 0x8098d96   XmlObjects::ReadSkinXMLFileObjects(this=0x80cfd60, file=...) (src/
#13 0x8091fd4   XmlObjects::ReadSkinXMLObjects(this=0x80cfd60) (src/
#14 0x80919b0   XmlObjects::XmlObjects(this=0x80cfd60) (src/
#15 0x805307f   XmlObjects::get() (include/xmlobjs.hh:67)
#16 0x80a5614   System::getContainer(this=0x811dcd8, vp=...) (src/mo/
#17 0x8052d71   Base::CallMethod(this=0x811dcd8, method=..., v=...) (include/mo/base.hh:31)
#18 0x8051f83   Interpreter::Call(this=0x80cfaf0, fr=0x811be98) (src/
#19 0x8053344   Interpreter::ExecCall(this=0x80cfaf0, fp=0x8143d06) (src/
#20 0x805258a   Interpreter::Execute(this=0x80cfaf0, i=258) (src/
#21 0x808833a   mldr::Run(this=0x80cfa60, fmaki=...) (src/
#22 0x804f67d   JPlayer::Run(this=0xbffff5c3) (src/
#23 0x8050aa5   main(argc=1, argv=0xbffff684) (src/

I don't see any reason why the second time call have to crash. Every idea about what's causing the issue is really appreciated.


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group