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

[REG] MSVC2015 static debug builds are broken in Qt 5.11 (CrtIsValidHeapPointer(block))

    XMLWordPrintable

Details

    • 97c8b970cdeae405018fdaaee12bf4cea59fb23f

    Description

      Static debug builds in Qt 5.11 are broken when using MSVC2015 compiler.

      Received error is "Expression: _CrtIsValidHeapPointer(block)"

      Stack trace is as follows:

      0039f678 77f126fa ntdll!RtlpNtEnumerateSubKey+0x3947
      0039f694 77ee1037 ntdll!RtlUlonglongByteSwap+0x1594a
      0039f700 760a5788 ntdll!RtlValidateHeap+0x7a
      0039f714 0f37c24b KERNELBASE!HeapValidate+0x14
      0039f728 0f37ab5e ucrtbased!CrtIsValidHeapPointer+0x2b
      0039f740 0f37d6dc ucrtbased!calloc_base+0x78e
      0039f780 0f37dca0 ucrtbased!free_dbg+0x7c
      0039f798 02cbe8d5 ucrtbased!free+0x20
      0039f7a4 0142c5f0 gallery!QArrayData::deallocate(struct QArrayData * data = 0x0481b728, unsigned int objectSize = 2, unsigned int alignment = 4)+0x75 [c:\projects\qt5-git\qt5\qtbase\src\corelib\tools\qarraydata.cpp @ 167]
      0039f7b8 02cd5ea6 gallery!QTypedArrayData<unsigned short>::deallocate(struct QArrayData * data = 0x0481b728)+0x10 [c:\projects\qt5-git\ttt_install\include\qtcore\qarraydata.h @ 237]
      0039f7d8 02ccf154 gallery!QString::reallocData(unsigned int alloc = 0x3f, bool grow = true)+0xe6 [c:\projects\qt5-git\qt5\qtbase\src\corelib\tools\qstring.cpp @ 2106]
      0039f7ec 02cdc8e0 gallery!QString::resize(int size = 0n62)+0x84 [c:\projects\qt5-git\qt5\qtbase\src\corelib\tools\qstring.cpp @ 2018]
      0039f800 02cd0192 gallery!append_utf8(class QString * qs = 0x0039f920, char * cs = 0x03f41cdc "QML debugging is enabled. Only use this in a safe environment.", int len = 0n62)+0x20 [c:\projects\qt5-git\qt5\qtbase\src\corelib\tools\qstring.cpp @ 6537]
      0039f934 02d8cb1d gallery!QString::vasprintf(char * cformat = 0x03f41cdc "QML debugging is enabled. Only use this in a safe environment.", char * ap = 0x0039f9a4 "???")+0xb2 [c:\projects\qt5-git\qt5\qtbase\src\corelib\tools\qstring.cpp @ 6632]
      0039f960 02d8a707 gallery!qt_message(QtMsgType msgType = QtDebugMsg (0n0), class QMessageLogContext * context = 0x0039f9a4, char * msg = 0x03f41cdc "QML debugging is enabled. Only use this in a safe environment.", char * ap = 0x0039f9a4 "???")+0x3d [c:\projects\qt5-git\qt5\qtbase\src\corelib\global\qlogging.cpp @ 361]
      0039f994 0282445b gallery!QMessageLogger::debug(char * msg = 0x03f41cdc "QML debugging is enabled. Only use this in a safe environment.")+0x47 [c:\projects\qt5-git\qt5\qtbase\src\corelib\global\qlogging.cpp @ 377]
      0039f9bc 0131c17f gallery!QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool printWarning = true)+0x3b [c:\projects\qt5-git\qt5\qtdeclarative\src\qml\debugger\qqmldebug.cpp @ 55]
      0039f9c8 0f395e09 gallery!`dynamic initializer for 'qQmlEnableDebuggingHelper''(void)+0xf [c:\projects\qt5-git\ttt_install\include\qtqml\qqmldebug.h @ 79]
      0039f9dc 0323b4be ucrtbased!initterm+0x49
      0039fa3c 0323b3ed gallery!__scrt_common_main_seh(void)+0xbe [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 221]
      0039fa44 0323b6e8 gallery!__scrt_common_main(void)+0xd [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 296]
      0039fa4c 7732336a gallery!WinMainCRTStartup(void)+0x8 [f:\dd\vctools\crt\vcstartup\src\startup\exe_winmain.cpp @ 17]
      0039fa58 77eb9902 kernel32!BaseThreadInitThunk+0x12
      0039fa98 77eb98d5 ntdll!RtlInitializeExceptionChain+0x63
      0039fab0 00000000 ntdll!RtlInitializeExceptionChain+0x36
      

      Only debug builds are broken. Release builds are fine. This issue is specific to Qt 5.11, doing static build in Qt 5.10 with MSVC2015 is fine.

      Used configure line was:

      ..\qt5\configure -prefix C:\projects\qt5-git\5.11.0_static_install -commercial -confirm-license -debug-and-release -static -static-runtime -skip qtwebengine -nomake examples -nomake tests
      

      Reproducible with any Qt application. Qt's example "gallery" was used to get this stack trace.

      Attachments

        Issue Links

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

          Activity

            People

              kkohne Kai Köhne
              jussi_witick Jussi Witick
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes