Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.8.5, 5.0.0
-
None
-
* Qt: Qt4 or Qt5 (does not matter)
* Compiler: MinGW (does not matter)
* Windows: 8 x32 (seems, does not matter)
* Devices: USB/Serial converter PL2303, USB CDMA modem ZTE MF180.
Description
The current implementation implements succesfully error handling ResourceError for USB/Serial/TTL converters and/or USB modems only under the following conditions:
- Open device
- Wait some second
- Pull dondle from USB
- Result -> ResourceError (it is correct)
However, under the following conditions, the error is not handled:
- Open device
- Read from device (at least one byte)
- Wait some second
- Pull dondle from USB
- Result -> Nothing (it is bug)
The reason for this is that when the device is pulled, then triggered an event EV_RXCHAR, in which called the method asyncRead() from the device, and starting the normal processing async read-sequence. In result, the entire sequence is successful, ReadFile() and other functions returns with no errors.
But just from the device read of zero bytes count.
Thus, this behavior leads to ignoring the error ResourceError.
It seems that this behavior with triggered EV_RXCHAR is most of USB/Serial converters, although maybe it depends on the specific device driver.
Need to investigate it and collect as much statistics of behavior for different devices.
UPD: Big request to interested users: please do a simple test and report the results here.
Best regards,
Denis
Attachments
For Gerrit Dashboard: QTBUG-32020 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
87045,3 | Improve the ResourceError handling on Windows | 5.3 | qt/qtserialport | Status: MERGED | +2 | 0 |