<?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 : Crash on PaintManager destructor</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Crash on PaintManager destructor]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 16 Jun 2026 04:18:50 +0000</pubDate>
  <lastBuildDate>Mon, 29 Jan 2007 01:02:07 +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=6215</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[Crash on PaintManager destructor : Thanks! :) ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19819&amp;title=crash-on-paintmanager-destructor#19819</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6215<br /><strong>Posted:</strong> 29 January 2007 at 1:02am<br /><br />Thanks! :)]]>
   </description>
   <pubDate>Mon, 29 Jan 2007 01:02:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19819&amp;title=crash-on-paintmanager-destructor#19819</guid>
  </item> 
  <item>
   <title><![CDATA[Crash on PaintManager destructor : Add http://msdl.microsoft.com/download/symbols...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19813&amp;title=crash-on-paintmanager-destructor#19813</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=150">Sven</a><br /><strong>Subject:</strong> 6215<br /><strong>Posted:</strong> 28 January 2007 at 5:37am<br /><br />Add http://msdl.microsoft.com/download/symbols as symbol directory in VC8 you will get debug information for all Windows dll's.  <img src="http://forum.codejock.com/smileys/smiley2.gif" border="0" align="middle"> ]]>
   </description>
   <pubDate>Sun, 28 Jan 2007 05:37:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19813&amp;title=crash-on-paintmanager-destructor#19813</guid>
  </item> 
  <item>
   <title><![CDATA[Crash on PaintManager destructor : Hi, You have debug strings of...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19774&amp;title=crash-on-paintmanager-destructor#19774</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6215<br /><strong>Posted:</strong> 26 January 2007 at 2:21pm<br /><br /><P>Hi,</P><DIV>You have debug strings of uxtheme.dll? How?? Where? :)</DIV>]]>
   </description>
   <pubDate>Fri, 26 Jan 2007 14:21:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19774&amp;title=crash-on-paintmanager-destructor#19774</guid>
  </item> 
  <item>
   <title><![CDATA[Crash on PaintManager destructor : While it didn&amp;#039;t work in Exit...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19766&amp;title=crash-on-paintmanager-destructor#19766</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1411">k_shehadeh</a><br /><strong>Subject:</strong> 6215<br /><strong>Posted:</strong> 26 January 2007 at 12:07pm<br /><br />While it didn't work in Exit Instance of the DLL, calling it in the deinit of the main application did work.&nbsp; Thanks!<br><br>(Though I'm still not clear what the source of the problem is)<br>]]>
   </description>
   <pubDate>Fri, 26 Jan 2007 12:07:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19766&amp;title=crash-on-paintmanager-destructor#19766</guid>
  </item> 
  <item>
   <title><![CDATA[Crash on PaintManager destructor : Hm. I tried that and now I&amp;#039;m...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19732&amp;title=crash-on-paintmanager-destructor#19732</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1411">k_shehadeh</a><br /><strong>Subject:</strong> 6215<br /><strong>Posted:</strong> 25 January 2007 at 2:06pm<br /><br />Hm.&nbsp; I tried that and now I'm getting a crash in a different place during the ExitInstance stack but still inside some paintmanager code:<br><br>void CXTPWinThemeWrapper::CloseThemeData()<br>{<br>&nbsp;&nbsp;&nbsp; if (m_hTheme &amp;&amp; !m_bDllDetached)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TRY_POINTER_CALL(CloseThemeData)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<font color="#ff0000"> POINTER_CALL(m_hTheme);</font><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CATCH_POINTER_CALL()<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; m_hTheme = NULL;<br>}<br><br><br>...<br><br>with the following stack:<br><br>&nbsp;&nbsp;&nbsp;&nbsp; uxtheme.dll!CAutoCS::CAutoCS()&nbsp; + 0x11 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; uxtheme.dll!CRenderList::CloseRenderObject()&nbsp; + 0x16 bytes&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; uxtheme.dll!_CloseThemeData@4()&nbsp; + 0x1f bytes&nbsp;&nbsp;&nbsp; <br>&gt;&nbsp;&nbsp;&nbsp; ToolkitPro1031vc80D.dll!CXTPWinThemeWrapper::CloseThemeData()&nbsp; Line 106 + 0xc bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1031vc80D.dll!CXTPWinThemeWrapper::~CXTPWinThemeWrapper()&nbsp; Line 82&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1031vc80D.dll!CXTPControlGalleryPaintManager::~CXTPControlGalleryPaintManager()&nbsp; + 0x2e bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1031vc80D.dll!CXTPControlGalleryPaintManager::`scalar deleting destructor'()&nbsp; + 0x2b bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1031vc80D.dll!CXTPPaintManager::~CXTPPaintManager()&nbsp; Line 160 + 0x31 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1031vc80D.dll!XTPPaintThemes::CXTPOfficeTheme::~CXTPOfficeTheme()&nbsp; + 0x2b bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1031vc80D.dll!XTPPaintThemes::CXTPOffice2003Theme::~CXTPOffice2003Theme()&nbsp; Line 67 + 0x1d bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1031vc80D.dll!XTPPaintThemes::CXTPOffice2003Theme::`vector deleting destructor'()&nbsp; + 0x6c bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; mfc80d.dll!CCmdTarget::OnFinalRelease()&nbsp; Line 579 + 0x21 bytes&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; mfc80d.dll!CCmdTarget::InternalRelease()&nbsp; Line 138&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1031vc80D.dll!CXTPPaintManager::Done()&nbsp; Line 254&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; typhon.dll!CTyphonApp::ExitInstance()&nbsp; Line 70 + 0xd bytes&nbsp;&nbsp;&nbsp; C++<br><br>]]>
   </description>
   <pubDate>Thu, 25 Jan 2007 14:06:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19732&amp;title=crash-on-paintmanager-destructor#19732</guid>
  </item> 
  <item>
   <title><![CDATA[Crash on PaintManager destructor : Hello, yes, think ExitInstance...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19730&amp;title=crash-on-paintmanager-destructor#19730</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6215<br /><strong>Posted:</strong> 25 January 2007 at 1:47pm<br /><br />Hello, yes, think ExitInstance good place.&nbsp; call<DIV>XTPPaintManager()-&gt;Done();</DIV>]]>
   </description>
   <pubDate>Thu, 25 Jan 2007 13:47:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19730&amp;title=crash-on-paintmanager-destructor#19730</guid>
  </item> 
  <item>
   <title><![CDATA[Crash on PaintManager destructor : At what point in the DLL should...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19721&amp;title=crash-on-paintmanager-destructor#19721</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1411">k_shehadeh</a><br /><strong>Subject:</strong> 6215<br /><strong>Posted:</strong> 25 January 2007 at 8:54am<br /><br />At what point in the DLL should I call Done in the DLL?&nbsp; Should it be in the applicaiton object's ExitInstance?&nbsp; And what's the best way to access the paint manager for the DLL?&nbsp; Is it a global object?]]>
   </description>
   <pubDate>Thu, 25 Jan 2007 08:54:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19721&amp;title=crash-on-paintmanager-destructor#19721</guid>
  </item> 
  <item>
   <title><![CDATA[Crash on PaintManager destructor : Hi, think problem that dll and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19704&amp;title=crash-on-paintmanager-destructor#19704</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 6215<br /><strong>Posted:</strong> 25 January 2007 at 1:09am<br /><br /><P>Hi,</P><DIV>think problem that dll and main application use diffrent paintmanagers.</DIV><DIV>&nbsp;</DIV><DIV>try to call pPaintManager-&gt;Done() ; in your dll manually.</DIV>]]>
   </description>
   <pubDate>Thu, 25 Jan 2007 01:09:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19704&amp;title=crash-on-paintmanager-destructor#19704</guid>
  </item> 
  <item>
   <title><![CDATA[Crash on PaintManager destructor : I&amp;#039;m seeing a crash with the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19690&amp;title=crash-on-paintmanager-destructor#19690</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1411">k_shehadeh</a><br /><strong>Subject:</strong> 6215<br /><strong>Posted:</strong> 24 January 2007 at 3:28pm<br /><br />I'm seeing a crash with the following stack when I shutdown my application:<br><br><font face="Courier New, Courier, mono" size="1"><font color="#ff0000">mfc80d.dll!AfxImageList_Destroy(_IMAGELIST * himl=0x0019d148)&nbsp; <br>mfc80d.dll!CImageList::DeleteImageList()&nbsp; C++<br>mfc80d.dll!CImageList::~CImageList()&nbsp; &nbsp; ToolkitPro1031vc80D.dll!XTPPaintThemes::CXTPOffice2003Theme::~CXTPOffice2003Theme()<br>ToolkitPro1031vc80D.dll!XTPPaintThemes::CXTPOffice2003Theme::`vector deleting destructor'() <br>mfc80d.dll!CCmdTarget::OnFinalRelease() <br>mfc80d.dll!CCmdTarget::InternalRelease()&nbsp; <br>ToolkitPro1031vc80D.dll!CXTPPaintManager::Done()&nbsp; ToolkitPro1031vc80D.dll!CXTPPaintManager::CPaintManagerDestructor::~CPaintManagerDestructor()<br></font><br><font face="Arial, Helvetica, sans-serif" size="2">The crash is occuring because m_hImageList is NULL&nbsp; inside of the CImageList class.&nbsp; What's interesting is that the class checks for NULL just before it calls AfxImageList_Destroy.&nbsp; <br><br>This began happening when I added code to a view that puts a CXTPToolBar at the top of the window.&nbsp; In the OnCreate of my CView-derived class I added the following code:<br>&nbsp;&nbsp; <font face="Courier New, Courier, mono" size="1"><font color="#0033cc">m_wndCameraToolBar.CreateToolBar(WS_TABSTOP|WS_VISIBLE|WS_CHILD|CBRS_TOOLTIPS, this)<br>m_wndCameraToolBar.SetOwner (this);<br>m_wndCameraToolBar.LoadToolBar(IDR_CAMERA_TOOLBAR);</font><br><br></font></font></font><font face="Courier New, Courier, mono" size="1"><font face="Arial, Helvetica, sans-serif" size="2">Where IDR_CAMERA_TOOLBAR is a toolbar resource that has button names that are the same as some button names in the main application toolbar (I think that might be relevant).<br><br>When I remove the code above, the crash no longer happens.&nbsp; I know this is a somewhat complicated situation to describe so I modified one of the CodeJock samples that does the same thing (but doesn't crash).&nbsp; The fact that the sample doesn't crash suggests that there's something else going on.&nbsp; Here is some other information that might be relevant:<br><br>1) The main app used codejock and mfc dynamically<br>2) The main app loads a DLL that also uses codejock and mfc dynamically<br>3) There is one other toolbar in the application that are created and used this way but instead of using LoadToolbar, it does this:<br><br><font color="#0033ff" face="Courier New, Courier, mono" size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPImageManager objecttypes;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; objecttypes.SetIcons (IDR_OBJECT_TYPES);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_wndToolBar.GetImageManager ()-&gt;AddIcons (&amp;objecttypes);<br></font><br></font></font><font face="Courier New, Courier, mono" size="1"><font face="Arial, Helvetica, sans-serif" size="2">See linked file for an example of what I'm trying to do (see CGUI_VisualStudio7View::OnCreate for new code):<br><br><a href="http://iw&#111;nderdesigns.com/downloads/GUI_VisualStudio7.zip" target="_blank">http://iwonderdesigns.com/downloads/GUI_VisualStudio7.zip</a><br><br>Thanks for your help,<br>Karim<br></font></font><font face="Courier New, Courier, mono" size="1"><br></font>]]>
   </description>
   <pubDate>Wed, 24 Jan 2007 15:28:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=6215&amp;PID=19690&amp;title=crash-on-paintmanager-destructor#19690</guid>
  </item> 
 </channel>
</rss>