<?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 : Urgent: Crash after winmain exits!</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Urgent: Crash after winmain exits!]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 01 May 2026 05:29:54 +0000</pubDate>
  <lastBuildDate>Fri, 17 Jul 2009 17:32:34 +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=12581</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[Urgent: Crash after winmain exits! : Is the crash due to CJ objects...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=51067&amp;title=urgent-crash-after-winmain-exits#51067</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 12581<br /><strong>Posted:</strong> 17 July 2009 at 5:32pm<br /><br />Is the crash due to CJ objects storing the module state data pointer?]]>
   </description>
   <pubDate>Fri, 17 Jul 2009 17:32:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=51067&amp;title=urgent-crash-after-winmain-exits#51067</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent: Crash after winmain exits! : Finally tested this code. Thank...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=45415&amp;title=urgent-crash-after-winmain-exits#45415</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 12581<br /><strong>Posted:</strong> 13 February 2009 at 5:58am<br /><br /><P>Finally tested this code. Thank you, it works! <img src="http://forum.codejock.com/smileys/smiley1.gif" border="0"></P>]]>
   </description>
   <pubDate>Fri, 13 Feb 2009 05:58:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=45415&amp;title=urgent-crash-after-winmain-exits#45415</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent: Crash after winmain exits! : Hi,  Yes - inside ActiveX you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=42544&amp;title=urgent-crash-after-winmain-exits#42544</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12581<br /><strong>Posted:</strong> 31 October 2008 at 12:51pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Yes - inside ActiveX you need cleanup some Static objects manually.</DIV><DIV>&nbsp;</DIV><DIV>call</DIV><DIV>CXTPPaintManager::Done()</DIV><DIV>and</DIV><DIV>XTPImageManager()-&gt;RemoveAll() in some ExitInstance.</DIV>]]>
   </description>
   <pubDate>Fri, 31 Oct 2008 12:51:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=42544&amp;title=urgent-crash-after-winmain-exits#42544</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent: Crash after winmain exits! : Commenting the call to TrackPopupMenu...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=42539&amp;title=urgent-crash-after-winmain-exits#42539</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 12581<br /><strong>Posted:</strong> 31 October 2008 at 11:16am<br /><br /><P>Commenting the call to TrackPopupMenu removes the problem.&nbsp; Hmmm?!</P>]]>
   </description>
   <pubDate>Fri, 31 Oct 2008 11:16:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=42539&amp;title=urgent-crash-after-winmain-exits#42539</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent: Crash after winmain exits! : We have a dialog that calls a...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=42537&amp;title=urgent-crash-after-winmain-exits#42537</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 12581<br /><strong>Posted:</strong> 31 October 2008 at 11:05am<br /><br /><DIV>We have a dialog that calls a function inside our OCX, showing a dialog. Inside this dialog I right-click to show a menu, and then dismiss the popup. After that, we exit our application (WM_COMMAND+IDCANCEL). When winmain exits, we get a crash at some AfxGetAmbientActCtx() call:</DIV><DIV>&nbsp;</DIV><DIV>&gt;&nbsp;mfc90d.dll!AfxGetAmbientActCtx()&nbsp; Line 37 + 0xa bytes&nbsp;C++<BR>&nbsp;&nbsp;mfc90d.dll!AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2(AFX_MODULE_STATE * pNewState=0x07b1e4c8)&nbsp; Line 86 + 0x5 bytes&nbsp;C++<BR>&nbsp;&nbsp;mfc90d.dll!CCmdTarget::InternalRelease()&nbsp; Line 173 + 0x14 bytes&nbsp;C++<BR>&nbsp;&nbsp;ToolkitPro1201vc90D.dll!00c509c2()&nbsp;&nbsp;<BR></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>This is how the menu is shown (inside the dialog):</DIV><DIV>&nbsp;</DIV><DIV>CXTPCommandBars* pCommandBars = (CXTPCommandBars*)CXTPCommandBars::CreateObject();<BR>&nbsp;if (pCommandBars)<BR>&nbsp;{<BR>&nbsp;&nbsp;pCommandBars-&gt;SetSite(this);<BR>&nbsp;<BR>&nbsp;&nbsp;CXTPPopupBar *pPopupBar = CXTPPopupBar::CreatePopupBar(pCommandBars);<BR>&nbsp;&nbsp;pPopupBar-&gt;LoadMenu(&amp;RButtonMenu);</DIV><DIV>&nbsp;&nbsp;pCommandBars-&gt;TrackPopupMenu(pPopupBar, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_VERTICAL, WindowPoint.x, WindowPoint.y, this);<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;pCommandBars-&gt;InternalRelease();<BR>&nbsp;&nbsp;pPopupBar-&gt;InternalRelease();<BR>&nbsp;}</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 31 Oct 2008 11:05:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12581&amp;PID=42537&amp;title=urgent-crash-after-winmain-exits#42537</guid>
  </item> 
 </channel>
</rss>