Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.12.0
-
None
-
Windows 10, 64-bit
Description
My multi-threaded application is having a heap corruption bug that happens intermittently. I used 'gflags' to enable heap verification so I could track down the problem. I have now caught the crash several times using a debugger with the following stack trace:
Qt5Core!QLocale::decimalPoint+0x90 Qt5Core!QLocale::system+0x15f Qt5Core!QDate::toString+0x4b
In my code, a QDate object is being called here with .toString("ddMMMyy")
If I modify my code to ensure QDate::toString is never called from more than one thread at a time the problem appears to go away.
May relate to QTBUG-49473, which was reported as fixed in version 5.11.0. I am using Qt 5.12.0, so it may still be persisting through another avenue.
Some additional diagnostic information from WinDbg in case it is useful:
EXCEPTION_RECORD: (.exr -1) ExceptionAddress: 00007ff8132f7400 (Qt5Core!QLocale::decimalPoint+0x0000000000000090) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 0000000000000001 Parameter[1]: 000002321607aff8 Attempt to write to address 000002321607aff8 STACK_TEXT: 0000008b`a2d0aee0 00007ff8`132fc08f : 00000000`00000001 0000008b`a2d0afb8 0000008b`a2d0b0a0 00000231`c23e9ff0 : Qt5Core!QLocale::decimalPoint+0x90 0000008b`a2d0af10 00007ff8`132eb34b : 0000008b`a2d0afb8 80000000`00000000 0000008b`a2d0b118 00007ff8`13274648 : Qt5Core!QLocale::system+0x15f 0000008b`a2d0af60 00007ff7`5344ef3e : 0000008b`a2d0b118 0000008b`a2d0b010 00000000`00000005 00000000`00000000 : Qt5Core!QDate::toString+0x4b [further stack trace omitted] STACK_COMMAND: ~0s; .ecxr ; kb SYMBOL_NAME: Qt5Core+90 MODULE_NAME: Qt5Core IMAGE_NAME: Qt5Core.dll FAILURE_BUCKET_ID: INVALID_POINTER_WRITE_AVRF_c0000005_Qt5Core.dll!Unknown OS_VERSION: 10.0.19041.1 BUILDLAB_STR: vb_release OSPLATFORM_TYPE: x64 OSNAME: Windows 10 IMAGE_VERSION: 5.12.0.0