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

TLS memory leak in libGLESv2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.0 Alpha
    • GUI: OpenGL, QPA: Windows
    • None
    • Visual Studio 2012.
      Qt built with ANGLE activated.

    Description

      Thread-local storage allocated by "TppWorkerThread" threads in the AllocateCurrent function in libGLESv2.dll are not destroyed on program termination. The reason for this is that DllMain(DLL_THREAD_DETACH) is never called for the worker threads.

      Leaking call stack for a minimal Qt application that loads libGLESv2.dll:

      • libGLESv2d.dll!`anonymous namespace'::AllocateCurrent() Line 49 C++
      • libGLESv2d.dll!DllMain(HINSTANCE__ * __formal=0x00850000, unsigned long reason=2, void * __formal=0x00000000) Line 96 C++
      • libGLESv2d.dll!__DllMainCRTStartup(void * hDllHandle=0x00850000, unsigned long dwReason=2, void * lpreserved=0x00000000) Line 508 C
      • libGLESv2d.dll!_DllMainCRTStartup(void * hDllHandle=0x00850000, unsigned long dwReason=2, void * lpreserved=0x00000000) Line 472 C

      Instructions for how to get a leak listing & break on leaking allocations: https://msdn.microsoft.com/en-us/library/x98tx3cf.aspx

      I'm not sure if this is a Qt or ANGLE issue, but regardless of reason it affects Qt applications.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            forderud Fredrik Orderud
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes