Re: g_main_dispatch frees objects for input_callback before using them (how to prevent it?)
- From: Thomas DEBESSE <dev illwieckz net>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: gtk-list gnome org
- Subject: Re: g_main_dispatch frees objects for input_callback before using them (how to prevent it?)
- Date: Sat, 11 Oct 2014 14:54:17 +0200
Thank you for your responses!
2014-10-10 22:54 GMT+02:00 Chris Vine <
chris cvine freeserve co uk>:
> 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.
I changed that, the diff is now:
https://github.com/XQF/xqf/compare/master...g_ioBut the bug is still there. ;-)
The problem is when I call "g_io_addwatch (chan, condition, callback, user_data)",
"g_io_add_watch" calls "g_io_add_watch_full (chan, condition, callback, user_data, and more)", ok.
But after that, g_main_dispatch calls "callback(bad pointer user_data, bad pointer condition)", not ok.
I fixed the return of the callback, but the callback fails before returning anything… g_main_dispatch pass wrongs arguments to the callback. :/
It seems something is lost somewhere…
(and yes it is a very old and very deprecated code, that's why I'm working on it. :D)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]