njamd compatible with gtk 2.2.1?
- From: Peter Van Wieren <peter vanwieren avlna com>
- To: gtk-list gnome org
- Subject: njamd compatible with gtk 2.2.1?
- Date: Fri, 30 Sep 2005 12:39:51 -0400
Hello,
If I use the memory debugging library njamd, then I find that my gtk
program will always fail with a segmentation fault. This occurs even
for the simple program hello.c on the gtk-tutorials page.
If I do not link to libnjamd, then the program works fine. The shell
session and gtk version information is shown below.
Is there any known incompatability between gtk and lnjamd? Is there
something I am doing wrong? Is there another memory debugger which is
recommended?
Thanks,
Pete
fenwick 0 308% pkg-config --cflags --libs gtk+-2.0 gthread-2.0 | tr ' ' \\n
-pthread
-I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0
-I/usr/include/pango-1.0
-I/usr/X11R6/include
-I/usr/include/freetype2
-I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include
-Wl,--export-dynamic
-pthread
-lgtk-x11-2.0
-lgdk-x11-2.0
-latk-1.0
-lgdk_pixbuf-2.0
-lm
-lpangoxft-1.0
-lpangox-1.0
-lpango-1.0
-lgobject-2.0
-lgmodule-2.0
-ldl
-lgthread-2.0
-lglib-2.0
fenwick 0 309% gcc -o hello hello.c `pkg-config --cflags --libs
gtk+-2.0 gthread-2.0`
fenwick 0 310% ./hello
Hello World
<works perfectly>
fenwick 0 311% gcc -o hello hello.c `pkg-config --cflags --libs gtk+-2.0
gthread-2.0` -lnjamd
fenwick 0 312% ldd hello
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x40034000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x40288000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x402f6000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0
(0x4030f000)
libm.so.6 => /lib/tls/libm.so.6 (0x40322000)
libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0x40345000)
libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0x40366000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x40373000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x403a6000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x403db000)
libdl.so.2 => /lib/libdl.so.2 (0x403df000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x403e3000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x403e8000)
libnjamd.so.0 => /usr/lib/libnjamd.so.0 (0x40452000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4045e000)
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0x4046b000)
libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40470000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40478000)
libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x40486000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x40498000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x404a0000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x404c5000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x405a5000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
libnsl.so.1 => /lib/libnsl.so.1 (0x405f6000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4060b000)
fenwick 0 313% ./hello
Segmentation fault (caught by NJAMD)
called from ./hello(main+0x177)[0x8048b95]
called from /lib/tls/libc.so.6(__libc_start_main+0xe4)[0x42015574]
called from ./hello(gtk_button_new_with_label+0x31)[0x804894d]
Cause of fault: Access to protected region
Address of fault is 0x6becf000
0x6bece000-0x6bed0000: Aligned len 21
Allocation callstack:
called from ./hello(main+0x16f)[0x8048b8d]
called from /lib/tls/libc.so.6(__libc_start_main+0xe4)[0x42015574]
called from ./hello(gtk_button_new_with_label+0x31)[0x804894d]
Not Freed
Abort (core dumped)
fenwick 134 314%
fenwick 1 319% rpm -qif /usr/lib/libgthread-2.0.so.0
/usr/lib/libgtk-x11-2.0.so.0
Name : glib2 Relocations: (not relocateable)
Version : 2.2.1 Vendor: Red Hat, Inc.
Release : 1 Build Date: Sun Feb 2
21:56:08 2003
Install Date: Tue Apr 13 19:02:18 2004 Build Host:
stripples.devel.redhat.com
Group : System Environment/Libraries Source RPM:
glib2-2.2.1-1.src.rpm
Size : 1232798 License: LGPL
Signature : DSA/SHA1, Mon Feb 24 01:17:03 2003, Key ID 219180cddb42a60e
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://www.gtk.org
Summary : A library of handy utility functions.
Description :
GLib is the low-level core library that forms the basis
for projects such as GTK+ and GNOME. It provides data structure
handling for C, portability wrappers, and interfaces for such runtime
functionality as an event loop, threads, dynamic loading, and anobject
system.
This package provides version 2 of GLib.
Name : gtk2 Relocations: (not relocateable)
Version : 2.2.1 Vendor: Red Hat, Inc.
Release : 4 Build Date: Tue Feb 25
08:43:44 2003
Install Date: Tue Apr 13 19:05:39 2004 Build Host:
sylvester.devel.redhat.com
Group : System Environment/Libraries Source RPM:
gtk2-2.2.1-4.src.rpm
Size : 7292190 License: LGPL
Signature : DSA/SHA1, Tue Feb 25 10:05:37 2003, Key ID 219180cddb42a60e
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://www.gtk.org
Summary : The GIMP ToolKit (GTK+), a library for creating GUIs for X.
Description :
GTK+ is a multi-platform toolkit for creating graphical user
interfaces. Offering a complete set of widgets, GTK+ is suitable for
projects ranging from small one-off tools to complete application
--
Peter Van Wieren, Project Engineer, AVL Powertrain Engineering, Inc. USA
734 414 9678 (voice)
734 414 9690 (fax)
email: peter vanwieren avlna com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]