Re: g_type_check_instance_cast segfault with entries
- From: Tristan Van Berkom <vantr touchtunes com>
- To: snagg <snagg openssl it>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: g_type_check_instance_cast segfault with entries
- Date: Wed, 15 Sep 2004 10:23:16 -0400
snagg wrote:
[...]
for(i = 0 ; list[i] != NULL; i++){
temp = gtk_editable_get_chars (GTK_EDITABLE (list[i]),0,-1);
snprintf(tmp,2056," list[%d]=\"%s\";\n",i , temp);
It segfaults with this message:
Program received signal SIGSEGV, Segmentation fault.
0x4041ecdc in g_type_check_instance_cast () from /usr/lib/libgobject-2.0.so.0
(gdb)
(gdb) bt
#0 0x4041ecdc in g_type_check_instance_cast ()
from /usr/lib/libgobject-2.0.so.0
#1 0x0804c227 in list_comp () at ged.c:104 --> the fuction wich take entries
`g_type_check_instance_cast()' is invoked in the macro `GTK_EDITABLE()'
So I'm pretty sure that `list[i]' is invalid. Is it possible that list[i]
is uninitialized on one of the passes ? (did you forget to mark the last
element in list; i.e. `list[n] = NULL;' ?).
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]