MFC Ms Access Close DB阻塞
MFC Ms Access Close DB blocking
有一个连接到 ms access 的 MFC 应用程序。有时 connection.close 会失败并阻止整个应用程序。此问题发生在 1909 windows 版本(我们从未在 1903 版本中遇到此错误)
这是完整的堆栈跟踪:(如果需要,我有一个转储文件)
ntdll.dll!_NtWaitForMultipleObjects@20()
KERNELBASE.dll!WaitForMultipleObjectsEx()
mso20win32client.dll!65e32850()
[Les frames ci-dessous sont peut-être incorrects et/ou manquants, aucun symbole chargé pour mso20win32client.dll]
AcLayers.dll!NS_FaultTolerantHeap::APIHook_RtlFreeHeap(void *,unsigned long,void *)
mso20win32client.dll!65d53a44()
mso40uiwin32client.dll!64479086()
mso50win32client.dll!6437940a()
mso.dll!621ed2c0()
ACECORE.DLL!798b6a26()
ACECORE.DLL!798525c5()
ACEOLEDB.DLL!7973c822()
ACEOLEDB.DLL!7973ccdd()
ACEOLEDB.DLL!7973a703()
ACEOLEDB.DLL!7973b283()
ACEOLEDB.DLL!79741fdc()
oledb32.dll!CAcm::FinalRelease()
oledb32.dll!CACMDynamic<class CDCM>::CmFinalRelease(void)
oledb32.dll!ATL::CComPolyObject<class CDCM>::Release(void)
oledb32.dll!CDCMPool::DestroyResource(unsigned long)
comsvcs.dll!CHolder::SafeDispenserDriver::DestroyResource()
comsvcs.dll!CHolder::Close()
oledb32.dll!CDCMPool::DetachFromHolder()
oledb32.dll!CDCMPoolManager::ScavangePools()
oledb32.dll!CDCMPoolManager::Release()
oledb32.dll!ATL::CComObject<CMSDAInitialize>::Release()
msado15.dll!CConnection::Term()
msado15.dll!ATL::CComObject<CConnection>::Release()
BAT_EMC3.exe!COleDispatchDriver::ReleaseDispatch() Ligne 155
BAT_EMC3.exe!COleDispatchDriver::~COleDispatchDriver() Ligne 131
BAT_EMC3.exe!_Connection::~_Connection()
BAT_EMC3.exe!_Connection::`scalar deleting destructor'(unsigned int)
BAT_EMC3.exe!CloseDB(_Connection * pConnection) Ligne 130
BAT_EMC3.exe!GetOptionsPath(bool bLMProfile, ATL::CStringT<wchar_t,StrTraitMFC<wchar_t,ATL::ChTraitsCRT<wchar_t> > > sSection, ATL::CStringT<wchar_t,StrTraitMFC<wchar_t,ATL::ChTraitsCRT<wchar_t> > > sParametres, ATL::CStringT<wchar_t,StrTraitMFC<wchar_t,ATL::ChTraitsCRT<wchar_t> > > sDefaultPath) Ligne 264
BAT_EMC3.exe!CBAT_EMCApp::CheckUpdate() Ligne 1293
BAT_EMC3.exe!CBAT_EMCApp::InitInstance() Ligne 269
BAT_EMC3.exe!AfxWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Ligne 37
BAT_EMC3.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Ligne 26
BAT_EMC3.exe!invoke_main() Ligne 123
BAT_EMC3.exe!__scrt_common_main_seh() Ligne 288
BAT_EMC3.exe!__scrt_common_main() Ligne 331
BAT_EMC3.exe!wWinMainCRTStartup() Ligne 17
kernel32.dll!@BaseThreadInitThunk@12()
ntdll.dll!__RtlUserThreadStart()
ntdll.dll!__RtlUserThreadStart@8()
我通过禁用池解决了我的问题,然后将其插入到连接字符串中:
";OLE DB Services = -2";
有关详细信息,请参阅 https://docs.microsoft.com/fr-fr/archive/blogs/selvar/ole-db-resource-pooling
有一个连接到 ms access 的 MFC 应用程序。有时 connection.close 会失败并阻止整个应用程序。此问题发生在 1909 windows 版本(我们从未在 1903 版本中遇到此错误)
这是完整的堆栈跟踪:(如果需要,我有一个转储文件)
ntdll.dll!_NtWaitForMultipleObjects@20()
KERNELBASE.dll!WaitForMultipleObjectsEx()
mso20win32client.dll!65e32850()
[Les frames ci-dessous sont peut-être incorrects et/ou manquants, aucun symbole chargé pour mso20win32client.dll]
AcLayers.dll!NS_FaultTolerantHeap::APIHook_RtlFreeHeap(void *,unsigned long,void *)
mso20win32client.dll!65d53a44()
mso40uiwin32client.dll!64479086()
mso50win32client.dll!6437940a()
mso.dll!621ed2c0()
ACECORE.DLL!798b6a26()
ACECORE.DLL!798525c5()
ACEOLEDB.DLL!7973c822()
ACEOLEDB.DLL!7973ccdd()
ACEOLEDB.DLL!7973a703()
ACEOLEDB.DLL!7973b283()
ACEOLEDB.DLL!79741fdc()
oledb32.dll!CAcm::FinalRelease()
oledb32.dll!CACMDynamic<class CDCM>::CmFinalRelease(void)
oledb32.dll!ATL::CComPolyObject<class CDCM>::Release(void)
oledb32.dll!CDCMPool::DestroyResource(unsigned long)
comsvcs.dll!CHolder::SafeDispenserDriver::DestroyResource()
comsvcs.dll!CHolder::Close()
oledb32.dll!CDCMPool::DetachFromHolder()
oledb32.dll!CDCMPoolManager::ScavangePools()
oledb32.dll!CDCMPoolManager::Release()
oledb32.dll!ATL::CComObject<CMSDAInitialize>::Release()
msado15.dll!CConnection::Term()
msado15.dll!ATL::CComObject<CConnection>::Release()
BAT_EMC3.exe!COleDispatchDriver::ReleaseDispatch() Ligne 155
BAT_EMC3.exe!COleDispatchDriver::~COleDispatchDriver() Ligne 131
BAT_EMC3.exe!_Connection::~_Connection()
BAT_EMC3.exe!_Connection::`scalar deleting destructor'(unsigned int)
BAT_EMC3.exe!CloseDB(_Connection * pConnection) Ligne 130
BAT_EMC3.exe!GetOptionsPath(bool bLMProfile, ATL::CStringT<wchar_t,StrTraitMFC<wchar_t,ATL::ChTraitsCRT<wchar_t> > > sSection, ATL::CStringT<wchar_t,StrTraitMFC<wchar_t,ATL::ChTraitsCRT<wchar_t> > > sParametres, ATL::CStringT<wchar_t,StrTraitMFC<wchar_t,ATL::ChTraitsCRT<wchar_t> > > sDefaultPath) Ligne 264
BAT_EMC3.exe!CBAT_EMCApp::CheckUpdate() Ligne 1293
BAT_EMC3.exe!CBAT_EMCApp::InitInstance() Ligne 269
BAT_EMC3.exe!AfxWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Ligne 37
BAT_EMC3.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Ligne 26
BAT_EMC3.exe!invoke_main() Ligne 123
BAT_EMC3.exe!__scrt_common_main_seh() Ligne 288
BAT_EMC3.exe!__scrt_common_main() Ligne 331
BAT_EMC3.exe!wWinMainCRTStartup() Ligne 17
kernel32.dll!@BaseThreadInitThunk@12()
ntdll.dll!__RtlUserThreadStart()
ntdll.dll!__RtlUserThreadStart@8()
我通过禁用池解决了我的问题,然后将其插入到连接字符串中:
";OLE DB Services = -2";
有关详细信息,请参阅 https://docs.microsoft.com/fr-fr/archive/blogs/selvar/ole-db-resource-pooling