GSlice: MemChecker: error



I have encountered a problem with some software I am trying to write that uses libchamplain. Using the launcher-gtk demo program I can reproduce some effects that might be causing the problem.

If I set the environment variable G_SLICE= debug-blocks, launcher-gtk immediately crashes with the error:

GSlice: MemChecker: attempt to release non-allocated block: 0xa198d18 size=4

I have attached a stack trace also.

It seems to me that when champlain_marker_new creates a new clutter_actor, ->color and ->text_color are not null. The first call to champlain_marker_set_color then tries to free memory that has not been allocated.

I apologise if this is a nonsensical report. This is my first involvement with this kind of programming, and I am still trying to find my way around.


Colin Clark


Signal        Stop	Print	Pass to program	Description
SIG33         No	No	Yes		Real-time event 33
Starting program: /home/cclark/Desktop/temp/mainline/demos/.libs/lt-launcher-gtk 
[Thread debugging using libthread_db enabled]
[New Thread 0xb6745720 (LWP 17648)]

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb6745720 (LWP 17648)]
0xb7f42430 in __kernel_vsyscall ()
#0  0xb7f42430 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb73a68a0 in raise () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#2  0xb73a8268 in abort () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#3  0xb7549b5f in g_slice_free1 () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#4  0xb79dae79 in clutter_color_free () from /usr/lib/libclutter-glx-0.8.so.0
No symbol table info available.
#5  0xb7b05aba in champlain_marker_set_color (marker=0x8d3e010, color=0xbff442c8) at champlain-marker.c:894
	priv = (ChamplainMarkerPrivate *) 0x8d3e0e8
	__PRETTY_FUNCTION__ = "champlain_marker_set_color"
#6  0x0804a468 in create_marker_layer (view=0x8c21000) at markers.c:48
	marker = (ClutterActor *) 0x8d3e010
	layer = (ChamplainLayer *) 0x8d3c808
	orange = {red = 243 'ó', green = 148 '\224', blue = 7 '\a', alpha = 187 '»'}
#7  0x08049c80 in main (argc=1, argv=0xbff443c4) at launcher-gtk.c:165
	window = (GtkWidget *) 0x8c0b818
	widget = (GtkWidget *) 0x8d38020
	vbox = (GtkWidget *) 0x8b8ef40
	bbox = (GtkWidget *) 0x804bff4
	button = <value optimized out>
	viewport = <value optimized out>
	view = (ClutterActor *) 0x8c21000
	layer = <value optimized out>
eax            0x0	0
ecx            0x44f0	17648
edx            0x6	6
ebx            0x44f0	17648
esp            0xbff440b8	0xbff440b8
ebp            0xbff440d0	0xbff440d0
esi            0x1	1
edi            0xb74d4ff4	-1219670028
eip            0xb7f42430	0xb7f42430 <__kernel_vsyscall+16>
eflags         0x206	[ PF IF ]
cs             0x73	115
ss             0x7b	123
ds             0x7b	123
es             0x7b	123
fs             0x0	0
gs             0x33	51

Thread 1 (Thread 0xb6745720 (LWP 17648)):
#0  0xb7f42430 in __kernel_vsyscall ()
#1  0xb73a68a0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb73a8268 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7549b5f in g_slice_free1 () from /usr/lib/libglib-2.0.so.0
#4  0xb79dae79 in clutter_color_free () from /usr/lib/libclutter-glx-0.8.so.0
#5  0xb7b05aba in champlain_marker_set_color (marker=0x8d3e010, color=0xbff442c8) at champlain-marker.c:894
#6  0x0804a468 in create_marker_layer (view=0x8c21000) at markers.c:48
#7  0x08049c80 in main (argc=1, argv=0xbff443c4) at launcher-gtk.c:165
The program is running.  Exit anyway? (y or n) 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]