I'm trying to rewrite inf-test-browser in python using gobject introspection and what I've encountered looks like a bug. Here is snippet code:
from gi.repository import Infinity
io = Infinity.StandaloneIo.new()
io.add_watch(0, Infinity.IoEvent.INCOMING | Infinity.IoEvent.ERROR, lambda *args, **kwargs: None, None)
io.add_watch(0xBEEF, Infinity.IoEvent.INCOMING | Infinity.IoEvent.ERROR, lambda *args, **kwargs: None, None)
I've added printf("%p\n", socket); to add_io_watch to confirm my guess and here is the output:
socket = (nil)
** (process:30884): CRITICAL **: inf_io_add_watch: assertion 'socket != NULL' failed
socket = 0xbeef
zsh: segmentation fault
I'm using python3 if that matters.
I'm trying to rewrite inf-test-browser in python using gobject introspection and what I've encountered looks like a bug. Here is snippet code:
I've added
printf("%p\n", socket);toadd_io_watchto confirm my guess and here is the output:I'm using python3 if that matters.