GNOME Bugzilla – Bug 635194
Assertion failed with lambda using upper closure member
Last modified: 2014-06-27 02:09:34 UTC
The following code produces an error while compiling with vala 0.11.2: Code: class Foo { public void print_handler (string msg) { } public static void main (string[] args) { var foo = new Foo (); set_print_handler((msg) => {foo.print_handler(msg);}); } } Error: ** ERROR:arraylist.c:348:vala_array_list_real_get: assertion failed: (_tmp0_) Aborted Making foo a global variable works around the issue.
Thanks for reporting the bug. I'm not able to reproduce it. Could you please provide the test case full of all definitions?
Previous info was for Hardened Gentoo Linux. The following is for Windows Val(a)IDE Vala 0.11.2 build, ran in latest MSYS. AstralStorm@destiny-vm ~ $ valac test.vala ** ERROR:arraylist.c:335:vala_array_list_real_get: assertion failed: ((index >= 0) && (index < self->priv->_size)) This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. AstralStorm@destiny-vm ~ $ valac --version Vala 0.11.2
Thanks for taking the time to report this bug. This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read http://bugzilla.gnome.org/bug-HOWTO.html and add a more useful description to this bug.