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

Crash in Qt Serial Port when using USB-serial adapter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.4.0
    • Serial Port

    Description

      There seems to be a heap corruption after calling QSerialPortInfo::availablePorts(), because deleting the resulting list causes
      ------
      Debug Assertion Failed!
      File: f:\dd\vctools\crt\crtw32\misc\dbgdel.cpp
      Line: 52
      Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
      ------
      This happens only with an USB-serial adapter. If you haven't plugged in any adapters the application works correctly.
      The test application is straightforward:

      #include <QList>
      #include <QtSerialPort/QSerialPortInfo>
      
      void infoTest()
      {
          QList<QSerialPortInfo> ports = QSerialPortInfo::availablePorts();
      }
      
      void main(int, char)
      {
          infoTest();
      }
      

      The crash happens when exiting the infoTest() function i.e. when deleting the ports list.

      Attachments

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

        Activity

          People

            kuzulis Denis Shienkov
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes