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

Windows debug build QString::toStdString() causes access violation

    XMLWordPrintable

Details

    • Windows

    Description

      A release build works fine, but I need a debug build to understand one of our problems but we have lots of code that converts from QString to std::string.

      I have attached some screen shots showing the problem happen debugging with qtcreator.

      I looked at QTBUG-58131 which sounds similar, but I don't think that's the problem...  (But I could be wrong.)

      The compile line for my source file is:

       cl /c /IC:\Users\cramem1\source\repos\rvc\local /I"C:\Users\cramem1\source\repos\rvc\build-local-x86_windows_msvc2019_pe_64bit-Debug" /Ic:\Intel\IPP\2018.3.210\2018.3.210\compilers_and_libraries_2018.3.210\windows\ipp\include /Ic:\Intel\MKL\2020.0.166\compilers_and_libraries_2020.0.166\windows\mkl\include /I"C:\Users\cramem1\source\repos\rvc\build-local-x86_windows_msvc2019_pe_64bit-Debug\PIU\Lib\Common" /IC:\Users\cramem1\source\repos\rvc\local\SYSTEM /I"C:\Users\cramem1\source\repos\rvc\local\..\third-party\NDI\include" /Zi /W1 /WX- /diagnostics:column /MP /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D QT_NO_FOREACH /D RTMD_WINDOWS /D RTMD_64BIT /D _USE_MATH_DEFINES /D _CRT_SECURE_NO_WARNINGS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Yu"pch.h" /Fp"PIUServerCommonLib.dir\Debug\/pch.pch" /Fo"PIUServerCommonLib.dir\Debug
      " /Fd"C:\Users\cramem1\source\repos\rvc\build-local-x86_windows_msvc2019_pe_64bit-Debug\lib\Debug\PIUServerCommonLib.pdb" /external:W0 /Gd /TP /wd4244 /wd4267 /FIpch.h /errorReport:queue  /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/QtCore" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/QtGui" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/QtWidgets" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/QtXml" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/QtNetwork" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/QtSvg" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/QtMultimedia" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/QtMultimediaWidgets" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/QtDBus" /external:I "C:/Qt/Qt5.15.15/5.15.15/msvc2019_64/include/Qwt" C:\Users\cramem1\source\repos\rvc\local\PIU\Lib\Common\PIUCondition.cxx

       

      The link line is:

        C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\cramem1\source\repos\rvc\build-local-x86_windows_msvc2019_pe_64bit-Debug\bin\Debug\PIUServer.exe" /INCREMENTAL /ILK:"PIUServer.dir\Debug\PIUServer.ilk" /NOLOGO ..\..\lib\Debug\VersionInfo.lib ..\..\lib\Debug\PIUServerGen1Lib.lib ..\..\lib\Debug\PIUServerCommonLib.lib ..\..\lib\Debug\RtmdEncoder.lib ..\..\lib\Debug\RtmdTracker.lib ..\..\lib\Debug\NDINDI.lib ..\..\lib\Debug\AGInterfaceLib.lib ..\..\lib\Debug\RtmdDataTransport.lib ..\..\lib\Debug\RtmdCommon.lib ..\..\lib\Debug\VersionInfo.lib ..\..\lib\Debug\QtExtSerialPort.lib C:\Qt\Qt5.15.15\5.15.15\msvc2019_64\lib\Qt5MultimediaWidgets.lib C:\Qt\Qt5.15.15\5.15.15\msvc2019_64\lib\Qt5Multimedia.lib C:\Qt\Qt5.15.15\5.15.15\msvc2019_64\lib\Qt5Svg.lib C:\Qt\Qt5.15.15\5.15.15\msvc2019_64\lib\Qt5Network.lib C:\Qt\Qt5.15.15\5.15.15\msvc2019_64\lib\Qt5DBus.lib C:\Qt\Qt5.15.15\5.15.15\msvc2019_64\lib\Qt5Xml.lib C:\Qt\Qt5.15.15\5.15.15\msvc2019_64\lib\Qt5Widgets.lib C:\Qt\Qt5.15.15\5.15.15\msvc2019_64\lib\Qt5Gui.lib C:\Qt\Qt5.15.15\5.15.15\msvc2019_64\lib\Qt5Core.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/Users/cramem1/source/repos/rvc/build-local-x86_windows_msvc2019_pe_64bit-Debug/bin/Debug/PIUServer.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/cramem1/source/repos/rvc/build-local-x86_windows_msvc2019_pe_64bit-Debug/lib/Debug/PIUServer.lib" /MACHINE:X64  /machine:x64 PIUServer.dir\Debug\PIUServerWin.obj

      Help would be appreciated

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            cramermb Michael Cramer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes