<?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 : LoadSkin causes ASSERT on exit in another DLL</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Skin Framework : LoadSkin causes ASSERT on exit in another DLL]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 14:55:55 +0000</pubDate>
  <lastBuildDate>Mon, 20 Apr 2015 14:06:41 +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=19545</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[LoadSkin causes ASSERT on exit in another DLL : Thank you all for bringing this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=73278&amp;title=loadskin-causes-assert-on-exit-in-another-dll#73278</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8848">mcmastl</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 20 April 2015 at 2:06pm<br /><br />Thank you all for bringing this to our attention, we have informed our development team and we will be looking into the issue. &nbsp;If the matter has been resolved please let us know. &nbsp;]]>
   </description>
   <pubDate>Mon, 20 Apr 2015 14:06:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=73278&amp;title=loadskin-causes-assert-on-exit-in-another-dll#73278</guid>
  </item> 
  <item>
   <title><![CDATA[LoadSkin causes ASSERT on exit in another DLL : Did anyone solve this?It appears...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=72695&amp;title=loadskin-causes-assert-on-exit-in-another-dll#72695</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 31 July 2014 at 4:26pm<br /><br />Did anyone solve this?<br><br>It appears the module state has not been correctly managed.<br><br>Would adding the AFX_MANAGE_SATE macro in your routine that loads the skin help?<br><br>Also, with side by side MFC modules, I have found that one can mess up module states if an access violation or some other exception occurs and the module state switching that should occur doesn't happen. But usually I get an invalid context activation exception eventually when it does. Of course you are shutting down (?) and that might not happen. I use the debugger and turn on first chance exception handling (win32, in particular access violations but usually just all) and then run my workflow and see if I am trapping some exception we have been ignoring, say with catch(...).<br>]]>
   </description>
   <pubDate>Thu, 31 Jul 2014 16:26:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=72695&amp;title=loadskin-causes-assert-on-exit-in-another-dll#72695</guid>
  </item> 
  <item>
   <title><![CDATA[LoadSkin causes ASSERT on exit in another DLL : Hi,Any update on above problem?Regards,Kalyani...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=72189&amp;title=loadskin-causes-assert-on-exit-in-another-dll#72189</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8347">Kalyani</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 13 January 2014 at 1:12am<br /><br />Hi,<br><br>Any update on above problem?<br><br>Regards,<br>Kalyani]]>
   </description>
   <pubDate>Mon, 13 Jan 2014 01:12:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=72189&amp;title=loadskin-causes-assert-on-exit-in-another-dll#72189</guid>
  </item> 
  <item>
   <title><![CDATA[LoadSkin causes ASSERT on exit in another DLL : Hi,I am facing the same problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=72171&amp;title=loadskin-causes-assert-on-exit-in-another-dll#72171</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8347">Kalyani</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 07 January 2014 at 12:12am<br /><br />Hi,<br><br>I am facing the same problem of crash in:<br><span style=": rgb248, 248, 252;">&nbsp;it ASSERTS inside the dll code.</span><br style=": rgb248, 248, 252;"><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">BOOL WINAPI RawDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID)</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">{</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; hInstance;</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; if (dwReason == DLL_PROCESS_ATTACH)</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; {</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">#ifdef _AFXDLL</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // make sure we have enough memory to attempt to start (8kb)</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; void* pMinHeap = LocalAlloc(NONZEROLPTR, 0x2000);</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pMinHeap == NULL)</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return FALSE;&nbsp;&nbsp; // fail if memory alloc fails</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LocalFree(pMinHeap);</span><br style=": rgb248, 248, 252;"><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // set module state before initialization</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _AFX_THREAD_STATE* pState = AfxGetThreadState();</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pState-&gt;m_pPrevModuleState = AfxSetModuleState(&amp;afxModuleState);</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; }</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; else if (dwReason == DLL_PROCESS_DETACH &amp;&amp; !__mixedModuleStartup)</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; {</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // restore module state after cleanup</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _AFX_THREAD_STATE* pState = AfxGetThreadState();</span><br style=": rgb248, 248, 252;"><b style=": rgb248, 248, 252;">Here &gt;&gt; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; VERIFY(AfxSetModuleState(pState-&gt;m_pPrevModuleState) ==&nbsp; &amp;afxModuleState);</b><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DEBUG_ONLY(pState-&gt;m_pPrevModuleState = NULL);</span><br style=": rgb248, 248, 252;"><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">#endif //_AFXDLL</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; }</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">&nbsp;&nbsp;&nbsp; return TRUE;</span><br style=": rgb248, 248, 252;"><span style=": rgb248, 248, 252;">}</span><div><span style=": rgb248, 248, 252;"><br></span></div><div><span style=": rgb248, 248, 252;">I am not sure of the reason, I commented the loadskin code as suggested here, but it still crashes.<br>It happens only in Debug mode of my application.<br>PS: codejock v16.2.6 and Visual Studio 2010, Windows 7 64bit<br><br>Request you to please help me wth the same.<br><br>Regards,<br>Kalyani</span></div>]]>
   </description>
   <pubDate>Tue, 07 Jan 2014 00:12:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=72171&amp;title=loadskin-causes-assert-on-exit-in-another-dll#72171</guid>
  </item> 
  <item>
   <title><![CDATA[LoadSkin causes ASSERT on exit in another DLL : Scrap that - too quick on the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71491&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71491</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8156">tim00005</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 06 August 2013 at 11:07am<br /><br />Scrap that - too quick on the post. Just tried again and it is still here. I give up:)]]>
   </description>
   <pubDate>Tue, 06 Aug 2013 11:07:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71491&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71491</guid>
  </item> 
  <item>
   <title><![CDATA[LoadSkin causes ASSERT on exit in another DLL : Sorry for the delay getting back...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71489&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71489</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8156">tim00005</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 06 August 2013 at 11:04am<br /><br />Sorry for the delay getting back on this - I have been away.<div><br></div><div>It was not project settings in the end, I noticed I was building in release so was not getting the assertion - duh.&nbsp;</div><div><br></div><div>However i have found a solution:&nbsp;</div><div><br></div><div>I was subclassing the&nbsp;m_hWndMDIClient in&nbsp;CMainFrame::CreateClient. If I call&nbsp;UnsubclassWindow in CMainFrame::OnDestroy then the problem goes away.&nbsp;</div><div><br></div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Tue, 06 Aug 2013 11:04:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71489&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71489</guid>
  </item> 
  <item>
   <title><![CDATA[LoadSkin causes ASSERT on exit in another DLL : Hi,Would be fine if you could...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71446&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71446</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 26 July 2013 at 3:20pm<br /><br />Hi,<br />Would be fine if you could tell us more about your changed project settings.]]>
   </description>
   <pubDate>Fri, 26 Jul 2013 15:20:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71446&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71446</guid>
  </item> 
  <item>
   <title><![CDATA[LoadSkin causes ASSERT on exit in another DLL : Hi, thanks for the help.I am not...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71439&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71439</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8156">tim00005</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 26 July 2013 at 3:58am<br /><br />Hi, thanks for the help.<div><br></div><div>I am not sure what happened but the assert no longer happens and the app closes correctly. I did change a number of project settings for different reasons so I guess it could be project settings related.</div><div><br></div><div>If it reappears I will try your suggestion. Hopefully I won't have to.</div><div><br></div><div>Tim.</div>]]>
   </description>
   <pubDate>Fri, 26 Jul 2013 03:58:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71439&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71439</guid>
  </item> 
  <item>
   <title><![CDATA[LoadSkin causes ASSERT on exit in another DLL : Hi;Try this in your ExitInstance()...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71420&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71420</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=109">mgampi</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 24 July 2013 at 2:02am<br /><br />Hi;<br><br>Try this in your ExitInstance() function:<br><br>int CMyCoreApp::ExitInstance() {<br>&nbsp;&nbsp;&nbsp; XTPSkinManager()-&gt;LoadSkin(L"", L"");<br>&nbsp;&nbsp;&nbsp; return CWinApp::ExitInstance();<br>}<br><br>I've several DLLs used in my app and skinning too. But in my case the app closes without an assert.<br>]]>
   </description>
   <pubDate>Wed, 24 Jul 2013 02:02:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71420&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71420</guid>
  </item> 
  <item>
   <title><![CDATA[LoadSkin causes ASSERT on exit in another DLL : Hi is there any update to this?...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71419&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71419</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8156">tim00005</a><br /><strong>Subject:</strong> 19545<br /><strong>Posted:</strong> 23 July 2013 at 12:29pm<br /><br />Hi is there any update to this? I am just about to start debugging the same problem. Code Jock version 16.2.0. VS 2012.<div><br></div><div>Cheers,</div><div><br></div><div>Tim.</div><div><br></div>]]>
   </description>
   <pubDate>Tue, 23 Jul 2013 12:29:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19545&amp;PID=71419&amp;title=loadskin-causes-assert-on-exit-in-another-dll#71419</guid>
  </item> 
 </channel>
</rss>