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

'QMutexLocker: "QMutex pointer is misaligned"' assertion failure in 'uic.exe' for ICC builds on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.7.0 Beta
    • Fix Version/s: 5.7.0 RC
    • Component/s: Core: Threads
    • Labels:
    • Environment:
    • Commits:
      b084739b89fbd32047d454075daf147073926f18

      Description

      Hi, Everyone,

      Got runtime error in uic.exe for Qt builds using ICC on Windows. Visual Studio Debugger output:

      Output:
      'uic.exe' (Win32): Loaded 'c:\libQT-5.7-dev\src\qtbase\bin\uic.exe'. Symbols loaded.
      'uic.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
      [snip]
      'uic.exe' (Win32): Loaded 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.1.146\windows\redist\intel64_win\compiler\libmmd.dll'. Module was built without symbols.
      'uic.exe' (Win32): Loaded 'c:\libICU-57.1\ICC64d\bin\icudt57.dll'. Cannot find or open the PDB file.
      'uic.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file.
      'uic.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file.
      'uic.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file.
      'uic.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Cannot find or open the PDB file.
      The thread 0xc64 has exited with code 0 (0x0).
      uic.exe has triggered a breakpoint.
      
      
      Call stack:
      >	Qt5Cored.dll!qt_message_fatal(QtMsgType, const QMessageLogContext & context, const QString & message) Line 1643	C++
      	Locals:
      +		context	{version=2 line=3071 file=0x00000000527f8d20 "global\\qglobal.cpp" ...}	const QMessageLogContext &
      +		contextFileL	0x00000076c431e4e0 {103, 108, 111, 98, 97, 108, 92, 113, 103, 108, 111, 98, 97, 108, 46, 99, 112, 112, ...}	unsigned short[256]
      +		message	ASSERT failure in QMutexLocker: "QMutex pointer is misaligned", file c:\libQT-5.7-dev\src\qtbase\include\QtCore\../../src/corelib/thread/qmutex.h, line 133	const QString &
      		reportMode	4	int
      		ret	1	int
      
          Qt5Cored.dll!QMessageLogger::fatal(const char * const msg) Line 792	C++
      	Locals:
      +		this	0x00000076c431e810 {context={version=2 line=3071 file=0x00000000527f8d20 "global\\qglobal.cpp" ...} }	const QMessageLogger *
      +		ap	0x0000000000000000 <NULL>	char *
      +		message	ASSERT failure in QMutexLocker: "QMutex pointer is misaligned", file c:\libQT-5.7-dev\src\qtbase\include\QtCore\../../src/corelib/thread/qmutex.h, line 133	QString
      +		msg	0x00000000527f8d3b "ASSERT failure in %s: \"%s\", file %s, line %d"	const char * const
      
          Qt5Cored.dll!qt_assert_x(const char * where, const char * what, const char * file, int line) Line 3072	C++
      	Locals:
      +		file	0x00000000527a8100 "c:\\libQT-5.7-dev\\src\\qtbase\\include\\QtCore\\../../src/corelib/thread/qmutex.h"	const char * const
      		line	133	int
      +		what	0x00000000527a815a "QMutex pointer is misaligned"	const char * const
      +		where	0x00000000527a814d "QMutexLocker"	const char * const
      	
          Qt5Cored.dll!QMutexLocker::QMutexLocker(QBasicMutex * m) Line 134	C++
          Locals:
      -		this	0x00000076c431e8d0 {val=2512579497768 }	QMutexLocker *
      		val	2512579497768	unsigned __int64
      -		m	0xcdcdcdcdcdcdcdcd {d_ptr={_q_value=??? } }	QBasicMutex *
      -		d_ptr	{_q_value=??? }	QBasicAtomicPointer<QMutexData>
      -		_q_value	???	std::atomic<QBasicAtomicPointer<QMutexData>::Type>
      		[value]	<Unable to read memory>	
      -		[Raw View]	{...}	std::atomic<QBasicAtomicPointer<QMutexData>::Type>
      -		std::_Atomic_address	{_My_val=??? }	std::_Atomic_address
      		_My_val	<Unable to read memory>	
      
      	
          Qt5Cored.dll!resolveTimerAPI() Line 301	C++
          Locals:
      +		locker	{val=2512579497768 }	QMutexLocker
      		triedResolve	false	bool
      
      	Qt5Cored.dll!QEventDispatcherWin32Private::QEventDispatcherWin32Private() Line 324	C++
          Locals:
      	0x0000024901688ec0 {threadId=4164 interrupt=false closingDown=false ...}
      	
      	Qt5Cored.dll!QEventDispatcherWin32::QEventDispatcherWin32(QObject * parent) Line 727	C++
          Locals:
      +		this	0x000002490169e210 {...}	QEventDispatcherWin32 *
      +		parent	0x00000076c431efa8 {...}	QObject * const {QCoreApplication}
      
      	Qt5Cored.dll!QCoreApplicationPrivate::createEventDispatcher() Line 504	C++
          Locals:
      +		this	0x00000249016847c0 {quitLockRef={...} argc=3 argv=0x000002490167a5b0 {0x000002490167a5d0 "C:\\libQT-5.7-dev\\src\\qtbase\\bin\\uic.exe"} ...}	QCoreApplicationPrivate *
      +		q	0x00000076c431efa8 {...}	QCoreApplication *
      	
      	Qt5Cored.dll!QCoreApplicationPrivate::init() Line 788	C++
          Locals:
      +		this	0x00000249016847c0 {quitLockRef={...} argc=3 argv=0x000002490167a5b0 {0x000002490167a5d0 "C:\\libQT-5.7-dev\\src\\qtbase\\bin\\uic.exe"} ...}	QCoreApplicationPrivate *
      +		appPaths	0x0000000000000000 <NULL>	QStringList *
      +		manualPaths	0x0000000000000000 <NULL>	QStringList *
      +		newPaths	{ size = -23716663 }	QStringList
      +		q	0x00000076c431efa8 {...}	QCoreApplication *
      	
          Qt5Cored.dll!QCoreApplication::QCoreApplication(int & argc, char * * argv, int _internal) Line 729	C++
          Locals:
      +		this	0x00000076c431efa8 {...}	QCoreApplication *
      		_internal	329472	int
      		argc	3	int &
      +		argv	0x000002490167a5b0 {0x000002490167a5d0 "C:\\libQT-5.7-dev\\src\\qtbase\\bin\\uic.exe"}	char * * const
      
          uic.exe!runUic(int argc, char * * argv) Line 48	C++
          uic.exe!main(int argc, char * * argv) Line 156	C++
          uic.exe!invoke_main() Line 75	C++
          uic.exe!__scrt_common_main_seh() Line 264	C++
          uic.exe!__scrt_common_main() Line 309	C++
          uic.exe!mainCRTStartup() Line 17	C++
          kernel32.dll!00007ffe4beb8102()	Unknown
          ntdll.dll!00007ffe4c01c264()	Unknown
      

      Used build commands:

      configure -prefix "%CD%\..\ICC64d\dll" -debug -opensource -c++std c++11 -shared -plugin-sql-sqlite -opengl dynamic -openvg -platform win32-icc -iconv -no-pch -qt-zlib -qt-pcre -icu -I "%CD%\..\..\libICU-57.1\ICC64d\include" -L "%CD%\..\..\libICU-57.1\ICC64d\lib" -qt-libpng -qt-libjpeg -avx -openssl -I "%CD%\..\..\libOPENSSL-1.1.0-dev\ICC64d\dll\include" -L "%CD%\..\..\libOPENSSL-1.1.0-dev\ICC64d\dll\lib" -dbus-runtime -confirm-license >_configure.log && jom
      
      configure -prefix "%CD%\..\ICC64r\lib" -release -opensource -c++std c++11 -static -plugin-sql-sqlite -opengl desktop -openvg -I "%CD%\..\..\libMESA-11.2-dev\ICC64r\include" -platform win32-icc -iconv -no-pch -qt-zlib -qt-pcre -icu -I "%CD%\..\..\libICU-57.1\ICC64r\include" -L "%CD%\..\..\libICU-57.1\ICC64r\lib" -qt-libpng -qt-libjpeg -avx -openssl -I "%CD%\..\..\libOPENSSL-1.1.0-dev\ICC64r\lib\include" -L "%CD%\..\..\libOPENSSL-1.1.0-dev\ICC64r\lib\lib" -dbus-runtime -confirm-license >_configure.log && jom
      

      Error reproduced for Debug+shared and Release+static configurations, but, probably, inherent to all other. It reproduces for ICC builds only, but not for Mingw-w64 or MSVC builds.

      It appeared after recent update in Qt-5.7-dev branch, and didn't reproduce with previous update.

      Since it breaks all Qt builds using ICC on Windows, is it possible to fix it in hot pursuit?

      Regards,
      Alexander

        Attachments

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

          Activity

            People

            • Assignee:
              thiago Thiago Macieira
              Reporter:
              sav sav
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes