Re: gtk_timeout_remove causes seg fault
- From: "Tara M" <learfox furry ao net>
- To: "LIST: GTKAppDevel" <gtk-app-devel-list gnome org>
- Subject: Re: gtk_timeout_remove causes seg fault
- Date: 17 Jul 2001 15:33:21 PDT
On Tue, 17 Jul 2001 20:30:44 +0200 (SAST), Marco Slaviero said:
Basically, I add a timeout which calls a network function, to refresh data
every so often. When the program is disconnected from the network,
obviously I don't want the program to carry on refreshing.
I have tried two strategies:
1) Call gtk_timeout_remove in the disconnect function.
This seg faults when calling gtk_timeout_remove.
2) Return FALSE if the network is disconnected.
This too causes a seg fault in gtk_timeout_remove.
Hmm, what level is your disconnect function in? Meaning is it
in the timeout function itself? But still I have written
apps like what you described without any problems.
A bt in gdb for 2 looks like this.
#0 0x4041d0e4 in chunk_free (ar_ptr=0x404b1d60, p=0x80a8030) at
malloc.c:3100
#1 0x4041cfba in __libc_free (mem=0x80a8038) at malloc.c:3023
#2 0x403ac36d in g_free ()
#3 0x403aaae0 in g_source_destroy_func ()
#4 0x403a87b3 in g_hook_free ()
#5 0x403a8aa8 in g_hook_unref ()
#6 0x403ab20e in g_main_dispatch ()
#7 0x403ab751 in g_main_iterate ()
#8 0x403ab8f1 in g_main_run ()
#9 0x401c67b9 in gtk_main ()
Looks like the problem occures deep within GTK+, which version
of GTK+ do you have?
# gtk-config --version
--
--
Sincerely, ,"-_ \|/
-Capt. Taura M. , O=__ --X--
.__ ,_JNMNNEO=_ /|\
OMNOUMmnne. {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn. 'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe. "7OMMMMNNNNNWWEEEEOOOOOO" "'.
EEBNNMMMNWNWWEEIMMNe. __ 7EMMMNNNNNWWWEEEEEEEOO. " .
NNMMMMWWWMMMWEINMMMNn "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._ .
http://furry.ao.net/~learfox/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]