Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-36727

QtSerialport enters a busy-loop when connected device file disappears

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.2
    • 5.2.0
    • Serial Port
    • 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();
      }
      

      Attachments

        For Gerrit Dashboard: QTBUG-36727
        # Subject Branch Project Status CR V

        Activity

          People

            kuzulis Denis Shienkov
            juturune Juha Turunen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes