|
From: Dan E. <Dan...@ne...> - 2006-09-29 08:59:23
|
This will only be a problem if you access the device through the handle yourself. I can't see anywhere in the code where this device pointer int the handle structure is accessed after the initial opening of the device. =20 I did think this was a problem at one point in time, but when I looked harder at the code I convinced myself it wasn't a problem and eventually tracked down the crash to something else. =20 Dan. ________________________________ From: lib...@li... [mailto:lib...@li...] On Behalf Of Mantz Steffen Sent: 28 September 2006 11:53 To: lib...@li... Subject: [Libusb-win32-devel] usb_find_devices invalidates usb_dev_handlewhen the device was removed Hi,=20 The problem arises in a multi threaded application. Thread #1 periodically checks for new and removed devices, while another thread handles an attached device. When a handled device is removed, usb_find_devices() deletes the devices. This invalidates the refrence to it in the usb_dev_handle, before the handler thread can be informed. Typically this leads to a crash. Any ideas? Thanks,=20 Steffen=20 |