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

QSerialPort file descriptor (handle) leak in open()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 5.2.1, 5.3.0, 5.3.1
    • Fix Version/s: 5.3.2
    • Component/s: Serial Port
    • Labels:
      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

            Assignee:
            kuzulis Denis Shienkov
            Reporter:
            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