Crash in skin code, sort of |
Post Reply |
Author | |
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 899 |
Post Options
Thanks(0)
Posted: 22 hours 5 minutes ago at 11:49am |
Shutting down the app I can get this code to throw the memory exception intentionally crashing our app. void* CXTPSingletonPointer::GetInstance() { _ASSERTE(!m_bDestroyed); if (m_bDestroyed) { AfxThrowMemoryException(); } I call the xtp shutdown code. I'm going to try and unload the skin before shutting down though that seems to be something I should not have to do. KernelBase.dll!00007ffeb39efb4c() Unknown
vcruntime140d.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 81 C++ mfc140ud.dll!AfxThrowMemoryException() Line 221 C++ > ToolkitPro2400vc170x64UD.dll!CXTPSingletonPointer::GetInstance() Line 75 C++ ToolkitPro2400vc170x64UD.dll!CXTPSingleton<CXTPSkinManager,CXTPSingletonDependencies<CXTPSingleton<CXTPSkinManagerModuleListSharedData,CXTPSingletonDependencies<CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency>>,CXTPSingleton<CXTPSkinManagerSchemaCodeManager,CXTPSingletonDependencies<CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency>>,CXTPSingleton<CXTPColorManager,CXTPSingletonDependencies<CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency>>,CXTPSingleton<CXTPFontCache,CXTPSingletonDependencies<CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency>>,CXTPSingleton<CXTPDpi,CXTPSingletonDependencies<CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency>>,CXTPSingleton<CXTPBrushCache,CXTPSingletonDependencies<CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency>>,CXTPSingleton<CXTPSoundManager,CXTPSingletonDependencies<CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency>>,CXTPDummySingletonDependency,CXTPDummySingletonDependency,CXTPDummySingletonDependency>>::Instance() Line 226 C++ ToolkitPro2400vc170x64UD.dll!XTPSkinManager() Line 918 C++ ToolkitPro2400vc170x64UD.dll!CXTPSkinManagerDetoursApiHook::OnHookDeleteObject(void * hObject) Line 669 C++ System.Windows.Forms.ni.dll!00007ffe91747b80() Unknown System.Windows.Forms.ni.dll!00007ffe916d6330() Unknown System.Windows.Forms.ni.dll!00007ffe916c62ef() Unknown System.Windows.Forms.ni.dll!00007ffe91710e7d() Unknown clr.dll!FastCallFinalizeWorker() Unknown clr.dll!FastCallFinalize() Unknown clr.dll!MethodTable::CallFinalizer() Unknown clr.dll!CallFinalizer() Unknown clr.dll!FinalizerThread::DoOneFinalization() Unknown clr.dll!FinalizerThread::FinalizeAllObjects() Unknown clr.dll!ManagedThreadBase_DispatchInner() Unknown clr.dll!ManagedThreadBase_DispatchMiddle() Unknown clr.dll!ManagedThreadBase_DispatchOuter() Unknown clr.dll!FinalizerThread::FinalizerThreadStart() Unknown clr.dll!Thread::intermediateThreadProc() Unknown kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown |
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 899 |
Post Options
Thanks(0)
|
I could not find a way to shut down the skin manager. I did find a way to avoid the crash. Since Win10 I have been calling XTPShutdown from my app. The reason for that was CJ calls Couninitialize in its DllMain. That is something the Microsoft documentation says should never be done because one cannot assume the order DLLs unload. I called the shutdown from our own code to fix the crash that started showing up in Win10 which occurred in Microsofts's UIAutomationcore.dll. I see the CJ DllMain still calls CoUninitialize but I removed our call to XTPShutdown and that, so far, has avoided the crash in the skin manger calls. I recall UIAutomationcore code caused CJ crashes previously and that was fixed a release or so again (V22 I think). Hopefully that crash won't come back. It was harder to duplicate than this one which is apparently occurring because our app is sometimes using .NET components. If I crash again, I will just modify the CJ code to not throw the memory exception as the app comes down. That excepting throwing is triggering our exception handling which then informs the user we crashed and sends crash data to our telemetry server.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |