ivigasin
6th March 2015, 02:59
Hi guys,
I have Qt (5.2.1) GUI application which I'm trying to expose as an ActiveX control. As usual after dll is built I call idc.exe to generate IDL. The problem is idc.exe always crashes on unloading QtCore.dll.
The main widget have some initialization/finalization code which is required for app to work. This code at some point create QRegEx object, which inside Qt leads to initializing QRegExpEngine and putting it to global static QCache hash.
Here is the stack trace:
Qt5Cored.dll!QGenericAtomicOps<QAtomicOpsBySize<4> >::load<long>(const long & _q_value) Line 96 C++
Qt5Cored.dll!QBasicAtomicInteger<int>::load() Line 142 C++
Qt5Cored.dll!QtPrivate::RefCount::deref() Line 66 C++
Qt5Cored.dll!QString::~QString() Line 921 C++
Qt5Cored.dll!QRegExpEngineKey::~QRegExpEngineKey() C++
Qt5Cored.dll!QHashNode<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::~QHashNode<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>() C++
Qt5Cored.dll!QHashNode<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::`scalar deleting destructor'(unsigned int) C++
Qt5Cored.dll!QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::deleteNode2(QHashData::Node * node) Line 544 C++
Qt5Cored.dll!QHashData::free_helper(void (QHashData::Node *) * node_delete) Line 423 C++
Qt5Cored.dll!QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::freeData(QHashData * x) Line 590 C++
Qt5Cored.dll!QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::~QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>() Line 301 C++
Qt5Cored.dll!QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::clear() Line 596 C++
Qt5Cored.dll!QCache<QRegExpEngineKey,QRegExpEngine>::clear() Line 127 C++
Qt5Cored.dll!QCache<QRegExpEngineKey,QRegExpEngine>::~QCache<QRegExpEngineKey,QRegExpEngine>() Line 95 C++
Qt5Cored.dll!QCache<QRegExpEngineKey,QRegExpEngine>::`scalar deleting destructor'(unsigned int) C++
Qt5Cored.dll!``anonymous namespace'::Q_QGS_globalEngineCache::innerFunction '::`8'::Cleanup::~Cleanup() Line 3825 C++
Qt5Cored.dll!``anonymous namespace'::Q_QGS_globalEngineCache::innerFunction '::`9'::`dynamic atexit destructor for 'cleanup''() C++
Qt5Cored.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 416 C
Qt5Cored.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 522 C
Qt5Cored.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 472 C
ntdll.dll!776699a0() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!7767d702() Unknown
ntdll.dll!7767d5a4() Unknown
kernel32.dll!770279ed() Unknown
msvcr110.dll!__crtExitProcess(int status) Line 725 C
msvcr110.dll!doexit(int code, int quick, int retcaller) Line 627 C
msvcr110.dll!exit(int code) Line 395 C
idc.exe!00e32f73() Unknown
kernel32.dll!7702338a() Unknown
ntdll.dll!77669f72() Unknown
ntdll.dll!77669f45() Unknown
Any ideas?
Thank you!
Kind regards, Ivan
I have Qt (5.2.1) GUI application which I'm trying to expose as an ActiveX control. As usual after dll is built I call idc.exe to generate IDL. The problem is idc.exe always crashes on unloading QtCore.dll.
The main widget have some initialization/finalization code which is required for app to work. This code at some point create QRegEx object, which inside Qt leads to initializing QRegExpEngine and putting it to global static QCache hash.
Here is the stack trace:
Qt5Cored.dll!QGenericAtomicOps<QAtomicOpsBySize<4> >::load<long>(const long & _q_value) Line 96 C++
Qt5Cored.dll!QBasicAtomicInteger<int>::load() Line 142 C++
Qt5Cored.dll!QtPrivate::RefCount::deref() Line 66 C++
Qt5Cored.dll!QString::~QString() Line 921 C++
Qt5Cored.dll!QRegExpEngineKey::~QRegExpEngineKey() C++
Qt5Cored.dll!QHashNode<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::~QHashNode<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>() C++
Qt5Cored.dll!QHashNode<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::`scalar deleting destructor'(unsigned int) C++
Qt5Cored.dll!QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::deleteNode2(QHashData::Node * node) Line 544 C++
Qt5Cored.dll!QHashData::free_helper(void (QHashData::Node *) * node_delete) Line 423 C++
Qt5Cored.dll!QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::freeData(QHashData * x) Line 590 C++
Qt5Cored.dll!QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::~QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>() Line 301 C++
Qt5Cored.dll!QHash<QRegExpEngineKey,QCache<QRegExpEngineKey,QRegExpEngine>::Node>::clear() Line 596 C++
Qt5Cored.dll!QCache<QRegExpEngineKey,QRegExpEngine>::clear() Line 127 C++
Qt5Cored.dll!QCache<QRegExpEngineKey,QRegExpEngine>::~QCache<QRegExpEngineKey,QRegExpEngine>() Line 95 C++
Qt5Cored.dll!QCache<QRegExpEngineKey,QRegExpEngine>::`scalar deleting destructor'(unsigned int) C++
Qt5Cored.dll!``anonymous namespace'::Q_QGS_globalEngineCache::innerFunction '::`8'::Cleanup::~Cleanup() Line 3825 C++
Qt5Cored.dll!``anonymous namespace'::Q_QGS_globalEngineCache::innerFunction '::`9'::`dynamic atexit destructor for 'cleanup''() C++
Qt5Cored.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 416 C
Qt5Cored.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 522 C
Qt5Cored.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 472 C
ntdll.dll!776699a0() Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!7767d702() Unknown
ntdll.dll!7767d5a4() Unknown
kernel32.dll!770279ed() Unknown
msvcr110.dll!__crtExitProcess(int status) Line 725 C
msvcr110.dll!doexit(int code, int quick, int retcaller) Line 627 C
msvcr110.dll!exit(int code) Line 395 C
idc.exe!00e32f73() Unknown
kernel32.dll!7702338a() Unknown
ntdll.dll!77669f72() Unknown
ntdll.dll!77669f45() Unknown
Any ideas?
Thank you!
Kind regards, Ivan