Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Debugging resource loss
Forum Updated to NodeBB v4.3 + New Features

Debugging resource loss

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.9k Views 1 Watching
  • 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.
  • J Offline
    J Offline
    jdarnold
    wrote on last edited by
    #1

    After running my Qt program for a bit, I get the following fatal error:

    @Critical: QFontEngine::loadEngine: CreateFontIndirect failed ()
    Critical: QFontEngine::loadEngine: CreateFontIndirect failed ()
    Critical: QFontEngine::loadEngine: CreateFontIndirect failed ()
    Fatal: ASSERT: "hdc" in file c:\ndk_buildrepos\qt-desktop\src\gui\image\qnativeimage.cpp, line 110
    @

    The working part of the program creates a lot of QPixmaps from QImages, perhaps 20-30 / second, as I display a full frame video stream:

    @void VideoWidget::DoUpdate()
    {
    if ( vpix && !image_changing_ )
    { // okay, repaint
    vpix->convertFromImage(*videoImage);
    ui->imageLabel->setPixmap(*vpix);
    }
    }
    @
    I'm not sure if that is connected. I imagine it is some kind of resource leak, but I'm not sure where to begin debugging and/or measuring this. As it takes a good 20-40 minutes to (reliably) reproduce, it's a real drag on my productivity!

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jdarnold
      wrote on last edited by
      #2

      Just a FYI - turns out it was actually in a DLL that was leaking an HDC every call. I gradually narrowed this down using Process Explorer, commenting out calls as the GDI Handles went up rapidly. As I commented out calls. if I saw the GDI Handles stay stable, I went deeper and finally found it.

      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