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

QPolygonF Heap Corruption

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.9.0
    • GUI: Painting
    • None
    • Windows
    • Windows

    Description

      I am getting this error message.  It is generated by the QPolygon destructor in the free call.

          ~QArrayDataPointer()
          {
              if (!deref()) {
                  (*this)->destroyAll();
                  free(d);       <-----------  HERE
              }
          }

       

       

      Attached is an example that crashes immediately after running.

      If you comment out the line

          poly.resize(2 + 2 * notches);

       

      in the file PhotoRotationDial.cpp, the crash will not occur.

      Stack trace

      >    QtImageRotater.exe!free_dbg_nolock(void * const block, const int block_use) Line 996    C++
           QtImageRotater.exe!_free_dbg(void * block, int block_use) Line 1030    C++
           QtImageRotater.exe!free(void * block) Line 39    C++
           QtImageRotater.exe!QArrayDataPointer<QPointF>::~QArrayDataPointer<QPointF>() Line 110    C++
           QtImageRotater.exe!QList<QPointF>::~QList<QPointF>()    C++
           QtImageRotater.exe!QPolygonF::~QPolygonF()    C++
           QtImageRotater.exe!drawDial(const QStyleOptionSlider * option, QPainter * p) Line 384    C++
           QtImageRotater.exe!PhotoRotationDial::paintEvent(QPaintEvent * event) Line 481    C++

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            doug_rogers Doug Rogers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes