Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.0
-
None
-
Ubuntu 12.04
Description
- Plug-in a USB serial port device (for example something PL2303 based).
- Run top.
- Compile and run the code below.
- Unplug the USB device.
- Observe the example consuming 100% CPU.
main.cppa
#include <QCoreApplication> #include <QSerialPort> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QSerialPort sp; sp.setPortName("ttyUSB0"); if (!sp.open(QSerialPort::ReadWrite)) { qFatal("Couldn't open ttyUSB0"); return false; } return a.exec(); }