Re: g_main_dispatch frees objects for input_callback before using them (how to prevent it?)
- From: Chris Vine <chris cvine freeserve co uk>
- To: Thomas DEBESSE <dev illwieckz net>
- Cc: gtk-list gnome org
- Subject: Re: g_main_dispatch frees objects for input_callback before using them (how to prevent it?)
- Date: Fri, 10 Oct 2014 21:54:27 +0100
On Fri, 10 Oct 2014 21:17:18 +0200
Thomas DEBESSE <dev illwieckz net> wrote:
2014-10-10 14:07 GMT+02:00 Chris Vine <chris cvine freeserve co uk>:
This may not be an issue in your code but note that a callback
function used as an io watch must return gboolean, and the return
value is used to determine whether the io watch is removed from the
list of sources. If you cast a function returning void to GIOFunc,
you will get random and undefined results.
Chris
Hum, it's really interesting, the problem may be there!
I'll try to change that.
If stat_master_input_callback() is a call back for a GIOChannel watch,
then by returning void the callback is definitely defective. That may
well explain your observations.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]