On Di, 2012-03-27 at 12:24 +0200, tomw wrote:
> On Di, 2012-03-27 at 11:59 +0200, Jens Georg wrote:
>
> > > try {
> > > debug ("Trying to run init_async");
> > > bool re = yield device.init_async (Priority.DEFAULT,
> > > cancellable);
> >
> > ^^ this yield returns to main loop and once init_async calls its
> > call-back will call init_finish for you. So after this line the device
> > is initialized.
>
> Thanks,
>
> I'm afraid that the statement above is just initializing a new device
> instance, which (according to gfreenect) can only be used after
> gfreenect_device_new_finish () is called like in the C example. This is
> why I was trying to create a finished instance in the callback. As the
> code is still crashing in libusb - Is there a way to get the callback
> called rather than the implicit init_finish being called from
> init_async?
gfreenect_device_new_finished is just calling _async_initable_new_finish
which calls async_initable_finish, same for _device_new. Removing the
subdevices property stops the crashing here. looking at the gfreenect
code that isn't used at all:
https://github.com/elima/GFreenect/blob/master/gfreenect/gfreenect-device.c#L1150
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list