Re: [Libusbx-devel] [PATCH 0/2] linux: Fix (sporadic) deadlock on libusb_exit

2013-07-20 Thread Chris Dickens
Hi, This patch does indeed fix the deadlock condition on libusb_exit(), but unfortunately it opens up another opportunity for deadlock :( If the hotplug event thread is processing a hotplug event when it is cancelled, there is a chance that it may be cancelled while holding the active_contexts_lo

Re: [Libusbx-devel] [libusbx] Mac OSX: libusbx crashes when unplugging a device (1.0.16) (#121)

2013-07-20 Thread Lilk
Ok. When is 1.0.17 due? We are using libusbx in a multi-platform application and it would be neat to be able to use the new hotplug api in our application (without the application crashing), with a graceful fallback, enabling us to just replace libusbx with the new version when you support Windo

Re: [Libusbx-devel] [libusbx] Mac OSX: libusbx crashes when unplugging a device (1.0.16) (#121)

2013-07-20 Thread Nathan Hjelm
Alright, that explains what is happening. The device is getting disconnected which triggers a call to usbi_handle_disconnect which cancels usbi_handle_transfer_completion. You are then getting notification from the os indicating the transfer failed. The fix I sent you avoid the segmentation faul

Re: [Libusbx-devel] [libusbx] Mac OSX: libusbx crashes when unplugging a device (1.0.16) (#121)

2013-07-20 Thread Lilk
Issue at least seems to be resolved by inserting the following at line 1534: if (itransfer->list.next) --- Reply to this email directly or view it on GitHub: https://github.com/libusbx/libusbx/issues/121#issuecomment-21292870 ---