have an MFC application connecting to ms access. sometimes the connection.close fails and is blocking the entire application. This issue is happening with 1909 windows version (and we never get this error with 1903 version)
here is the complete stack trace : (i have a dump file if necessary)
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()
I solved my issue by disabling the pooling, then inserting this in the connectionstring:
";OLE DB Services = -2";
see https://learn.microsoft.com/fr-fr/archive/blogs/selvar/ole-db-resource-pooling for more information