<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Deadlock?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : Deadlock?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 14 Apr 2026 06:43:04 +0000</pubDate>
  <lastBuildDate>Fri, 13 Mar 2026 10:21:05 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=24629</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Deadlock? : Hello,Thanks for reporting the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24629&amp;PID=79364&amp;title=deadlock#79364</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8199">astoyan</a><br /><strong>Subject:</strong> 24629<br /><strong>Posted:</strong> 13 March 2026 at 10:21am<br /><br /><div>Hello,</div><div><br></div><div>Thanks for reporting the issue. Please check your private messages for a potential solution and confirm if it works. Once confirmed, the changes will be integrated to the next update.</div><div><br></div><div>Regards,</div><div>&nbsp; &nbsp;Alexander</div>]]>
   </description>
   <pubDate>Fri, 13 Mar 2026 10:21:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24629&amp;PID=79364&amp;title=deadlock#79364</guid>
  </item> 
  <item>
   <title><![CDATA[Deadlock? : I see this once in a while. I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24629&amp;PID=79359&amp;title=deadlock#79359</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24629<br /><strong>Posted:</strong> 27 February 2026 at 4:49pm<br /><br /><div>I see this once in a while. I am starting up a debug session and open one of our files. The app hangs. take a look at this code:</div><div><br></div><div>_XTP_EXT_CLASS CXTPSkinManager* AFX_CDECL XTPSkinManager()<br>{<br>&nbsp; &nbsp; XTP_SKINFRAMEWORK_GLOBALLOCK_SHARED_SCOPE();<br><br>&nbsp; &nbsp; if (CXTPSkinManager::s_pInstance == NULL)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; CXTPSkinManager::s_pInstance = &amp;XTPSkinManagerSingleton::Instance();<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; return CXTPSkinManager::s_pInstance;<br>}</div><div><br></div><div>Note this line:</div><div><br></div><div>&nbsp; &nbsp; XTP_SKINFRAMEWORK_GLOBALLOCK_SHARED_SCOPE();</div><div><br></div><div>On the main thread the stack is:</div><div><br></div><div>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPSimpleCriticalSection::Enter() Line 100&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPSimpleCriticalSection::CLock::CLock(CXTPSimpleCriticalSection &amp; cs) Line 169&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPRWCriticalSection::LockShared(int bPopMode) Line 327&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPRWCriticalSection::LockShared() Line 227&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPRWCriticalSection::CSharedLock::CSharedLock(CXTPRWCriticalSection &amp; cs) Line 311&nbsp; &nbsp; C++<br>&gt;&nbsp; &nbsp; ToolkitPro2410vc170x64UD.dll!XTPSkinManager() Line 914&nbsp; &nbsp; C++<br><br></div><div>In the Enter() function I am stuck in this loop:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (0 != m_nLock)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sleep(dwTimeout);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (dwTimeout &lt; XTP_SYNC_MAX_EXPONENTIAL_TIMEOUT)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dwTimeout &lt;&lt;= 1;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br><br></div><div>Examining the plethora of ToolkitPro worker threads I find this one:</div><div><br></div>&nbsp; &nbsp; &nbsp;ntdll.dll!NtWaitForAlertByThreadId()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ntdll.dll!RtlpWaitOnCriticalSection()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ntdll.dll!RtlpEnterCriticalSectionContended()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ntdll.dll!RtlEnterCriticalSection()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ucrtbased.dll!00007ff8aa103817()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ucrtbased.dll!00007ff8aa0ffb5a()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ucrtbased.dll!00007ff8aa0fffcd()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ucrtbased.dll!00007ff8aa0ff4df()&nbsp; &nbsp; Unknown<br>&gt;&nbsp; &nbsp; mfc140ud.dll!operator new(unsigned __int64 nSize, int nType, const char * lpszFileName, int nLine) Line 47&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;mfc140ud.dll!CObject::operator new(unsigned __int64 nSize, const char * lpszFileName, int nLine) Line 67&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPRWCriticalSection::IncrementLocalSharedLockCounter() Line 374&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPRWCriticalSection::LockShared(int bPopMode) Line 337&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPRWCriticalSection::LockShared() Line 227&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPRWCriticalSection::CSharedLock::CSharedLock(CXTPRWCriticalSection &amp; cs) Line 311&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!XTPSkinManager() Line 914&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPSkinManagerDetoursApiHook::OnHookGetProcAddress(HINSTANCE__ * hModule, const char * pszProcName) Line 2040&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;clr.dll!__delayLoadHelper2()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!__tailMerge_ole32_dll()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!RegMeta::CreateNewMD()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!Disp::DefineScope()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!PEFile::DefineEmitScope()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!Assembly::CreateDynamic()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!AppDomainNative::CreateDynamicAssembly()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;mscorlib.ni.dll!00007ff9aef92b48()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;mscorlib.ni.dll!00007ff9aef92957()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;mscorlib.ni.dll!00007ff9af9a640d()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;mscorlib.ni.dll!00007ff9af03bbec()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;mscorlib.ni.dll!00007ff9af9a5e2e()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;00007ff9511f8242()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;00007ff9511f2ae1()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;00007ff9511f2607()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;mscorlib.ni.dll!00007ff9aeff9f93()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;mscorlib.ni.dll!00007ff9aeff9bcd()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;00007ff9511ec3e7()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;00007ff9511e6fd4()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;00007ff9511e482e()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;00007ff9511e35a3()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;00007ff9511e3501()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;00007ff9511b5468()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!CallDescrWorkerInternal()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!CallDescrWorkerWithHandler()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!CallDescrWorkerReflectionWrapper(struct CallDescrData *,class Frame *)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!RuntimeMethodHandle::InvokeMethod()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;mscorlib.ni.dll!00007ff9aeffef68()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;mscorlib.ni.dll!00007ff9aefdaa16()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!CallDescrWorkerInternal()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!CallDescrWorkerWithHandler()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!MethodDescCallSite::CallTargetWorker()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!DispatchInfo::InvokeMemberWorker(struct DispatchMemberInfo *,struct InvokeObjects *,int,int,int,int &amp;,int &amp;,long,struct tagDISPPARAMS *,struct tagVARIANT *,unsigned short,unsigned long,long *,struct tagVARIANT *,struct OBJECTHANDLE__ * *,int *,struct tagVARIANT * *)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!DispatchInfo::InvokeMemberDebuggerWrapper(struct DispatchMemberInfo *,struct InvokeObjects *,int,int,int,int &amp;,int &amp;,long,struct tagDISPPARAMS *,struct tagVARIANT *,unsigned short,unsigned long,long *,struct tagVARIANT *,struct OBJECTHANDLE__ * *,int *,struct tagVARIANT * *,class Frame *)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!DispatchInfo::InvokeMember(struct SimpleComCallWrapper *,long,unsigned long,unsigned short,struct tagDISPPARAMS *,struct tagVARIANT *,struct tagEXCEPINFO *,struct IServiceProvider *,unsigned int *)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!InternalDispatchImpl_Invoke(struct IDispatch *,long,struct _GUID const &amp;,unsigned long,unsigned short,struct tagDISPPARAMS *,struct tagVARIANT *,struct tagEXCEPINFO *,unsigned int *)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!Dispatch_Invoke(struct IDispatch *,long,struct _GUID const &amp;,unsigned long,unsigned short,struct tagDISPPARAMS *,struct tagVARIANT *,struct tagEXCEPINFO *,unsigned int *)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!Dispatch_Invoke_CallBack(void *)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;clr.dll!Dispatch_Invoke_Wrapper(struct IDispatch *,long,struct _GUID const &amp;,unsigned long,unsigned short,struct tagDISPPARAMS *,struct tagVARIANT *,struct tagEXCEPINFO *,unsigned int *)&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;partbrpD.dll!_com_invoke_helper(IDispatch * pDispatch, long dwDispID, unsigned short wFlags, unsigned short vtRet, void * pvRet, const wchar_t * pwParamInfo, char * argList, IErrorInfo * * pperrinfo) Line 322&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;partbrpD.dll!_com_dispatch_method(IDispatch * pDispatch, long dwDispID, unsigned short wFlags, unsigned short vtRet, void * pvRet, const wchar_t * pwParamInfo, ...) Line 83&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;partbrpD.dll!ExcelReader::GetExcelSheetCount(_bstr_t Filename, long * nSheets) Line 16&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;partbrpD.dll!JMReadHoleThreadStandardsFile_OpenXML2(GUserFileName excelFile, int isheet, int * pStatus, bool bReadingFromThread) Line 4792&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;partbrpD.dll!UJMReadHoleThreadStandardInfo(GUserText standard, int isheet, int * pStatus) Line 10822&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;partbrpD.dll!ReadDBSheetProc(void * pParam) Line 10869&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;mfc140ud.dll!_AfxThreadEntry(void * pParam) Line 109&nbsp; &nbsp; C++<br>&nbsp; &nbsp; &nbsp;ucrtbased.dll!00007ff8aa122ec5()&nbsp; &nbsp; Unknown<br>&nbsp; &nbsp; &nbsp;ToolkitPro2410vc170x64UD.dll!CXTPSkinManagerDetoursApiHook::ThreadProcHook(void * lpThreadData) Line 603&nbsp; &nbsp; C++<br><div><br></div><div><br></div><div>Notice that thread is also calling:</div><div><br></div><div>XTP_EXT_CLASS CXTPSkinManager* AFX_CDECL XTPSkinManager()<br>{<br>&nbsp; &nbsp; XTP_SKINFRAMEWORK_GLOBALLOCK_SHARED_SCOPE();<br><br>&nbsp; &nbsp; if (CXTPSkinManager::s_pInstance == NULL)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; CXTPSkinManager::s_pInstance = &amp;XTPSkinManagerSingleton::Instance();<br>&nbsp; &nbsp; }<br><br>&nbsp; &nbsp; return CXTPSkinManager::s_pInstance;<br>}</div><div><br></div><div>Setting breakpoints I see the main thread is in the loop. Meanwhile the second thread never returns from the RtlpWaitOnCriticalObject.</div><div><br></div><div>Since we have entered idle processing and we are a COM app, the OS is freeing unused libraries. That goes thru _AfxCrtDumpClient which is what the main thread is hooking into when memory leak detection is running and the call to get the mscoree.dll is made:</div><div><br></div><div>void __cdecl _AfxCrtDumpClient(void * pvData, size_t nBytes)<br>{<br>&nbsp; &nbsp; if(_CrtReportBlockType(pvData) != _AFX_CLIENT_BLOCK)<br>&nbsp; &nbsp; &nbsp; &nbsp; return;<br>&nbsp; &nbsp; char sz&#091;256&#093;;<br>&nbsp; &nbsp; CObject* pObject = (CObject*)pvData;<br>&nbsp; &nbsp; bool fCLRPresent=(::GetModuleHandleW(L"mscoree.dll")!=NULL);<br><br></div><div>All other ToolkitPro threads look standard and are all "small stacks" waiting on an object.</div><div><br></div><div>When this happens all I can do is restart.</div>]]>
   </description>
   <pubDate>Fri, 27 Feb 2026 16:49:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24629&amp;PID=79359&amp;title=deadlock#79359</guid>
  </item> 
 </channel>
</rss>