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

QSerialPort::close() crashs application after ejecting device

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.7.1
    • 5.7.0
    • Serial Port
    • None
    • Ubuntu 14.04 GCC 4.8.4
    • If536f9cf5cbc1b813d3642bdf9be0867e06368e8

    Description

      Function QSerialPort::close() was called after receiving QSerialPort::ResourceError (occurs due to ejecting device: Profilic Technology 2303, Silicon Labs ea60) crashs application with output:

      ASSERT: "m_buf" in file /opt/Qt5.7/5.7/gcc_64/include/QtCore/5.7.0/QtCore/private/qiodevice_p.h, line 102.

      qserialport_unix.cpp
      bool QSerialPortPrivate::readNotification()
      {   
          ...
          if (readBytes <= 0) {
              QSerialPortErrorInfo error = getSystemError();
              if (error.errorCode != QSerialPort::ResourceError)
                  error.errorCode = QSerialPort::ReadError;
              else
                  setReadNotificationEnabled(false);
              setError(error);
              buffer.chop(bytesToRead); // <-------- PLACE OF CRASH
              return false;
          }
          ...
          return true;
      }
      

      Attachments

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

        Activity

          People

            kuzulis Denis Shienkov
            amuralev Artem Muralev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes