Re: g_main_dispatch frees objects for input_callback before using them (how to prevent it?)

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

 



On Fri, 10 Oct 2014 21:17:18 +0200
Thomas DEBESSE <dev@xxxxxxxxxxxxx> wrote:
> 2014-10-10 14:07 GMT+02:00 Chris Vine <chris@xxxxxxxxxxxxxxxxxxxxx>:
> > 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
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list




[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux