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

Crash when Qt is dynamically loaded in Windows XP

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0
    • 5.3.1
    • Core: I/O, Core: Threads
    • None
    • Windows XP SP3 32 bit , Visual C++ 2010 debug/release
    • 0fa0608f707306cb34a9ca91952cebbac25065a5

    Description

      Suppose having:
      Main.exe -> LoadLibrary (GUI.dll)
      GUI.dll -> imports QtCore.dll

      When GUI.dll (and consequently QtCore) is dynamically loaded, the process crashes on the first warning/error at qlogging.cpp:1289
      This is because the thread local variable "msgHandlerGrabbed" is not correctly allocated by the system.

      See http://msdn.microsoft.com/en-us/library/2s9wt68x.aspx

      "On Windows operating systems before Windows Vista, __declspec( thread ) has some limitations. If a DLL declares any data or object as __declspec( thread ), it can cause a protection fault if dynamically loaded. ...."

      This is exactly what it happens.

      By directly importing Main.exe -> QtCore.dll
      it works.
      So at the moment, Qt cannot be dynamically loaded in Windows XP.

      Attachments

        For Gerrit Dashboard: QTBUG-41008
        # Subject Branch Project Status CR V

        Activity

          People

            kkohne Kai Köhne
            qbprog Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes