Hi Erik,
It would be helpful to see when in the course of execution calls to
libusb_unref_device() are made. Could you add this, in
libusb_unref_device() in core.c:
usbi_mutex_lock(dev-lock);
refcnt = --dev-refcnt;
usbi_mutex_unlock(dev-lock);
+ usbi_dbg(unref device %p refcount=%d, dev,
This line tells a lot of the story:
[ 6.849000] [1fae] libusbx: debug [libusb_unref_device] destroy device
2.57
This can only happen when a device's refcount == 0, which should not happen
while an active transfer is occurring. When a device is enumerated, its
refcount is 1. When you open the
Hi Chris,
thanks for your interesting explanation.
No, I haven't registered any callbacks. I'm using the connect to an
interface and doing bulk reads and bulk writes - no async handling. I would
expect to get a libusb return code that tells me hey the device is no
longer there on which I
Which version of libusb(x) are you using? This sounds like an issue that
was present in an older version (fixed by commit
858b794cf10ff1ac76a4f453bed7645aa9709c44).
Chris
On Thu, Feb 13, 2014 at 2:29 PM, Erik Rull erik.r...@rdsoftware.de wrote:
Hi Chris,
thanks for your interesting