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

QSerialPort::waitForBytesWritten() does not work properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.2.1
    • Fix Version/s: 5.3.1
    • Component/s: Serial Port
    • Labels:
      None
    • Environment:
      Qt5.2.1, Windows 7 64bit, Qt 5.2.1 for Windows 32-bit (MinGW 4.8, OpenGL, 634 MB)

      Description

      Now, in Qt5.2.1 QTBUG-33987 seems to be fixed, I have no longer the problem that waitForReadyRead returns true although the following readAll() returns an empty QByteArray.

      Unfortunately, the method waitForBytesWritten seems to be broken now. Sometimes, not always, the function timeouts and therefore returns false. At the moment I have two solutions:

      1. Don't call waitForBytesWritten. I've a handshake based communication, so every write causes a response, that I check by calling waitForReadyRead. Instead of
        write -> waitForBytesWritten -> waitForReadyRead -> readAll
        I just use it this way now:
        write -> waitForReadyRead -> readAll
      2. Return to Qt5.2.0

        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:
            rene René Keimling
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes