Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Help! Why QSGDefaultPainterNode causes memoryleak instance unsigned char[]
Forum Updated to NodeBB v4.3 + New Features

Help! Why QSGDefaultPainterNode causes memoryleak instance unsigned char[]

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 88 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Darry
    wrote last edited by Darry
    #1

    my code

    
    void QmlCustomPlot::paint( QPainter* painter )
    {
        if (m_plot)
        {
            QPixmap picture( boundingRect().size().toSize() );
            picture.fill(Qt::transparent);
            QCPPainter qcpPainter( &picture );
            m_plot->toPainter( &qcpPainter);
            painter->drawPixmap( QPoint(), picture );
        }
    }
    

    leak stack
    kernel32.dll!0x7ff87072e8d7()
    Qt6Guid.dll!QImageData::create() - 行 147
    Qt6Guid.dll!QImage::QImage() - 行 822
    Qt6Guid.dll!QImage::QImage() - 行 807
    Qt6Guid.dll!QImage::copy() - 行 1226
    Qt6Guid.dll!QImage::detach() - 行 1131
    Qt6Guid.dll!QPainter::begin() - 行 1714
    Qt6Quickd.dll!QSGDefaultPainterNode::paint() - 行 79
    Qt6Quickd.dll!QSGDefaultPainterNode::update() - 行 136
    Qt6Quickd.dll!QQuickPaintedItem::updatePaintNode() - 行 554
    Qt6Quickd.dll!QQuickWindowPrivate::updateDirtyNode() - 行 2271
    Qt6Quickd.dll!QQuickWindowPrivate::updateDirtyNodes() - 行 2014
    Qt6Quickd.dll!QQuickWindowPrivate::syncSceneGraph() - 行 568
    Qt6Quickd.dll!QSGRenderThread::sync() - 行 554
    Qt6Quickd.dll!QSGRenderThread::syncAndRender() - 行 719
    Qt6Quickd.dll!QSGRenderThread::run() - 行 979
    Qt6Cored.dll!QThreadPrivate::start() - 行 273

    {C++}(unsigned char*)0X27A0730C070,1115808 = 0x0000027a0730c070 "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0...

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote last edited by
      #2

      How did you find this? Please use a proper tool for this and provide a minimal, compilable example to reproduce the problem. The stack does not match to your code at all.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      D 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        How did you find this? Please use a proper tool for this and provide a minimal, compilable example to reproduce the problem. The stack does not match to your code at all.

        D Offline
        D Offline
        Darry
        wrote last edited by
        #3

        @Christian-Ehrlicher bcaa5467-0fe0-4b0d-8058-8da9502059a8-image.png c470031b-6fc7-46d4-8ae8-5001f50a8c1a-image.png c2322bd8-f25e-47fa-8296-0a9848a78423-image.png

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote last edited by
          #4

          This tells me nothing - we need a minimal, compilable example to reproduce the problem and you have to use a proper memory checking tool.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved