GNOME Bugzilla – Bug 608184
Async callback in closure crashes vala with meaningless error
Last modified: 2010-02-04 18:03:56 UTC
public async int test_async () { Idle.add (() => { print ("In idle\n"); test_async.callback (); }); yield; return 0; } $ valac --pkg gio-2.0 callbacktest.vala ERROR:valamethod.c:3172:vala_method_get_callback_method: assertion failed: (self->priv->_coroutine) Aborted After some digging, I found out that get_callback_method is being called on the closure rather than the method containing it, which causes the problem.
commit 2ae8cd1509f3489277f621440a8902b8eecf9e79 Author: Jürg Billeter <j@bitron.ch> Date: Thu Feb 4 19:02:44 2010 +0100 GAsync: Support async callback from closure Fixes bug 608184.