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
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
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
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
---