<?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 : CXTPStatusBar crash during RemoveALl</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : CXTPStatusBar crash during RemoveALl]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 22:01:56 +0000</pubDate>
  <lastBuildDate>Mon, 03 May 2021 12:36:30 +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=24083</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[CXTPStatusBar crash during RemoveALl : Odd I didn&amp;#039;t get any mail...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=78092&amp;title=cxtpstatusbar-crash-during-removeall#78092</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24083<br /><strong>Posted:</strong> 03 May 2021 at 12:36pm<br /><br />Odd I didn't get any mail regarding replies to this. I believe I gave a very good description of the problem and the easy fix to just test your pointer in the code. Please do so as the call stack, whether you can duplicate it or not, doesn't lie and I was able to step right thru the code and see the null pointer access and subsequent crash.<br>]]>
   </description>
   <pubDate>Mon, 03 May 2021 12:36:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=78092&amp;title=cxtpstatusbar-crash-during-removeall#78092</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPStatusBar crash during RemoveALl : Hello,I am going to close this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=78086&amp;title=cxtpstatusbar-crash-during-removeall#78086</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> 24083<br /><strong>Posted:</strong> 21 April 2021 at 8:50am<br /><br /><div>Hello,</div><div><br></div><div>I am going to close this issue for now since I have not heard back from you. Please let me know if we need to re-open this issue at a later date.</div><div><br></div><div>Regards,</div><div>Artem Gontarenko<br></div>]]>
   </description>
   <pubDate>Wed, 21 Apr 2021 08:50:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=78086&amp;title=cxtpstatusbar-crash-during-removeall#78086</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPStatusBar crash during RemoveALl : Hello,Could you please create...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=77994&amp;title=cxtpstatusbar-crash-during-removeall#77994</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> 24083<br /><strong>Posted:</strong> 08 December 2020 at 5:04am<br /><br />Hello,<div><br></div><div>Could you please create a support ticket and attach a sample with a reproduced error.</div><div><br></div><div>Regards,</div>Artem Gontarenko]]>
   </description>
   <pubDate>Tue, 08 Dec 2020 05:04:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=77994&amp;title=cxtpstatusbar-crash-during-removeall#77994</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPStatusBar crash during RemoveALl : Hello,Can I reproduce this bug...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=77965&amp;title=cxtpstatusbar-crash-during-removeall#77965</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9012">agontarenko</a><br /><strong>Subject:</strong> 24083<br /><strong>Posted:</strong> 27 November 2020 at 3:35am<br /><br /><div>Hello,</div><div><br></div><div>Can I reproduce this bug with our sample?</div><div><br></div><div>Regards,</div><div>Artem Gontarenko<br></div>]]>
   </description>
   <pubDate>Fri, 27 Nov 2020 03:35:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=77965&amp;title=cxtpstatusbar-crash-during-removeall#77965</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPStatusBar crash during RemoveALl : While examining the status bar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=77910&amp;title=cxtpstatusbar-crash-during-removeall#77910</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24083<br /><strong>Posted:</strong> 21 October 2020 at 11:20am<br /><br />While examining the status bar pane code, I see the code is inconsistent in testing the m_pStatusBar back pointer before using it. So, the code expects the pointer can be null in some places but not in other places.<br>]]>
   </description>
   <pubDate>Wed, 21 Oct 2020 11:20:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=77910&amp;title=cxtpstatusbar-crash-during-removeall#77910</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPStatusBar crash during RemoveALl : We have added auto complete to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=77909&amp;title=cxtpstatusbar-crash-during-removeall#77909</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24083<br /><strong>Posted:</strong> 21 October 2020 at 11:10am<br /><br /><div>We have added auto complete to an edit box we have on our status bar. Now we find that we can crash when calling SetIndicators. What is happening is that RemoveAll is looping over m_arrPanes and setting the m_pSutatusBar to null in the loop and then calling InternalRelease.</div><div><br></div><div>When InternalRelease is called, my CEdit control gets the expected DestroyWindow call. When the OS processes the window destruction call, the IAutoComplete object I have connected to the edit control is being decoupled and deep in the OS, the code dispatches WM_PAINT messages.</div><div><br></div><div>The status bar gets a WM_PAINT message and, to make a long story short this happens:</div><div><br></div><div>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1930vc160x64UD.dll!CXTPStatusBar::GetPaintManager() Line 1125&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1930vc160x64UD.dll!CXTPStatusBar::GetStatusBarPaintManager() Line 1133&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1930vc160x64UD.dll!CXTPStatusBarPane::OnDraw(CDC * pDC=0x0000000000ded240, CRect rcItem={...}) Line 271&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1930vc160x64UD.dll!CXTPStatusBar::DrawPaneEntry(CDC * pDC=0x0000000000ded240, int nIndex=4, CRect rcItem={...}) Line 1144&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1930vc160x64UD.dll!CXTPStatusBar::OnDraw(CDC * pDC=0x0000000000ded240) Line 1218&nbsp;&nbsp;&nbsp; C++<br>&nbsp;&nbsp;&nbsp;&nbsp; ToolkitPro1930vc160x64UD.dll!CXTPStatusBar::OnPaint() Line 1151&nbsp;&nbsp;&nbsp; C++<br></div><div><br></div><div>In OnDraw, the code loops thru the same array of CXTPStatusBarPane objects that are currently being released. The edit control pane is encountered and the OnDraw method is called and the code doesn't check to see that m_pStatusBar is now set to null by the RemoveAll code that is still executing.</div><div><br></div><div>We are seeing this with CJ 19.3 and Windows 10 1809 but it doesn't occur on all machines so may be somewhat OS dependent.<br></div><div><br></div><div>I added code in the edit control DestroyWindow call to PeekMessage and remove WM_PAINT (the OS dispatches the paint messages). That forces the paint to occur right away and I crash independent of the OS.</div><div><br></div><div>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; CWnd* pParent = GetParent();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; if( pParent )<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MSG&nbsp;&nbsp;&nbsp; Msg;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if( PeekMessage(&nbsp; &amp;Msg, pParent-&gt;GetSafeHwnd(), WM_PAINT,&nbsp; WM_PAINT, PM_NOREMOVE|PM_NOYIELD ) )<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TRACE("Found paint message for status bar");<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; while (::PeekMessage(&amp;Msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE))<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; }<br></div><div><br></div><div>It looks like I will be modifying CJ code to either test the status bar backpointer so it doesn't crash or to remove the item from the array before destroying it.<br></div><div> <br></div>]]>
   </description>
   <pubDate>Wed, 21 Oct 2020 11:10:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24083&amp;PID=77909&amp;title=cxtpstatusbar-crash-during-removeall#77909</guid>
  </item> 
 </channel>
</rss>