After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608184 - Async callback in closure crashes vala with meaningless error
Async callback in closure crashes vala with meaningless error
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Async
unspecified
Other All
: Normal blocker
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-26 19:00 UTC by zarevucky.jiri
Modified: 2010-02-04 18:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description zarevucky.jiri 2010-01-26 19:00:06 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.
Comment 1 Jürg Billeter 2010-02-04 18:03:56 UTC
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.