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

QSerialPort file descriptor (handle) leak in open()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.3.2
    • 5.2.1, 5.3.0, 5.3.1
    • Serial Port
    • None

    Description

      It is possible that system file handle/descriptor is opened successfully in
      "bool QSerialPortPrivate::open(QIODevice::OpenMode mode)",
      but 'false' is returned due to some other error in that function.
      In that case opened descriptor is never closed.

      For example, if Windows goes back from sleep CreateFile() is successful, but GetCommState() fails for some time. So, the entire application should be restarted to release leaked handle, since the device state is 'closed'.

      I did not observe any real failure scenario on other OS's, however the similar leak is also present for example in Unix implementation.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kuzulis Denis Shienkov
            orest Orest Hera
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes