GNOME Bugzilla – Bug 755916
Gio.Task is unable to return GLib.Error / task.return_error(e) with ASSERT !=NULL
Last modified: 2016-01-23 04:06:14 UTC
sample.py --- from gi.repository import GLib, Gio def cb(*args, **kwargs): pass t = Gio.Task.new(None, None, cb, None, 0) t.return_error(GLib.Error()) --- Given the sample code sample.py, "python sample.py" will bail out with: TypeError: Gio.Task.return_error() takes exactly 1 argument (2 given) And "python3 sample.py" will show: (process:12319): GLib-GIO-CRITICAL **: g_task_return_error: assertion 'error != NULL' failed Fedora 22, pygobject-3.19.1-py3.4-linux-x86_64 via jhbuild
Also Gio.SimpleAsyncResult.new_from_error(None, None, None, GLib.Error()) would give you (process:7444): GLib-GIO-CRITICAL **: g_simple_async_result_set_from_error: assertion 'error != NULL' failed
We want to be able to use this in Builder, too. I suspect something handling a TAG_ERROR is not checking the the argument direction.
Yeah, that is the problem that holds me on Meson build plugin for Builder.
*** This bug has been marked as a duplicate of bug 685197 ***