GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Apr 24, 2014 3:19 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: gtk_file_chooser
PostPosted: Mon Jul 22, 2013 5:33 pm 
Offline

Joined: Mon Feb 08, 2010 10:22 am
Posts: 2
Hy.

I'm developing an application using wxWidgets-2.8.10 (GTK-2.0) for Linux.
The application runs perfectly on my build machine which is a Debian 7.0. running on a Virtual Machine

I have other pc running a Debian 7.0 live cd. On that pc, everytime I open a gtk_file_chooser the application segfaults.
Here is the valgrind output:

==1984== Invalid write of size 4
==1984== at 0x6AE6AA8: ??? (in /lib/i386-linux-gnu/libpng12.so.0.49.0)
==1984== by 0x6AFB777: ??? (in /lib/i386-linux-gnu/libpng12.so.0.49.0)
==1984== by 0x6AFC1F3: ??? (in /lib/i386-linux-gnu/libpng12.so.0.49.0)
==1984== Address 0x74da35c is 0 bytes after a block of size 740 alloc'd
==1984== at 0x4028308: malloc (vg_replace_malloc.c:263)
==1984== by 0x675342A: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==1984==
==1984== Invalid free() / delete / delete[] / realloc()
==1984== at 0x402750C: free (vg_replace_malloc.c:427)
==1984== by 0x675377A: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==1984== by 0x67538EF: g_free (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==1984== by 0x161A578A: ??? (in /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
==1984== by 0x6AE6A96: ??? (in /lib/i386-linux-gnu/libpng12.so.0.49.0)
==1984== by 0x6AFB777: ??? (in /lib/i386-linux-gnu/libpng12.so.0.49.0)
==1984== by 0x6AFC1F3: ??? (in /lib/i386-linux-gnu/libpng12.so.0.49.0)
==1984== by 0x77006571: ???
==1984== Address 0x4f is not stack'd, malloc'd or (recently) free'd
==1984==
==1984== Invalid read of size 1
==1984== at 0x66D74B1: g_type_check_instance_is_a (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3200.4)
==1984== by 0x633CFD5: ??? (in /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0.2400.10)
==1984== by 0x633F46E: gdk_window_process_all_updates (in /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0.2400.10)
==1984== by 0x5F4277E: ??? (in /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0.2400.10)
==1984== by 0x631A583: ??? (in /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0.2400.10)
==1984== by 0x674B18F: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==1984== by 0x674D6D2: g_main_context_dispatch (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==1984== by 0x674DA6F: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==1984== by 0x674DECA: g_main_loop_run (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==1984== by 0x5FCDACF: gtk_main (in /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0.2400.10)
==1984== by 0x53E2BC9: wxEventLoop::Run() (evtloop.cpp:76)
==1984== by 0x5435E99: wxDialog::ShowModal() (dialog.cpp:146)
==1984== Address 0x92a6b34 is 12 bytes inside a block of size 52 free'd
==1984== at 0x402750C: free (vg_replace_malloc.c:427)
==1984== by 0x675377A: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==1984== by 0x67538EF: g_free (in /lib/i386-linux-gnu/libglib-2.0.so.0.3200.4)
==1984== by 0x161A578A: ??? (in /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so)
==1984== by 0x6AE6A96: ??? (in /lib/i386-linux-gnu/libpng12.so.0.49.0)
==1984== by 0x6AFB777: ??? (in /lib/i386-linux-gnu/libpng12.so.0.49.0)
==1984== by 0x6AFC1F3: ??? (in /lib/i386-linux-gnu/libpng12.so.0.49.0)
==1984== by 0xF: ???
==1984==


PS:Using valgrind the application doesn't crash.


Any idea?
Thankx


Top
 Profile  
 
 Post subject: Re: gtk_file_chooser
PostPosted: Wed Jul 24, 2013 8:25 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 709
Location: UK
Hi,

From the stack trace I can see that there has been an invalid access to memory, so most probably to memory that has not been allocated to your application. Without seeing your source and how the relevant variables are allocated/accessed it is hard to debug from just a stack trace only. Since this is WxWidgets have you asked in the WxWidget community.

Have you tried upgrading Debian to 7.1 there are a number of security fixes to Wheezy.

Note when an application is run under Valgrind it is under a virtual machine and so will react differently to when run on a real machine.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users 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