<?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 : DockingPane wincore assertion</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Docking Pane : DockingPane wincore assertion]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 10:01:21 +0000</pubDate>
  <lastBuildDate>Fri, 05 Dec 2008 03:43:35 +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=12809</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[DockingPane wincore assertion : Hi, Create demo project, reproduce...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12809&amp;PID=43444&amp;title=dockingpane-wincore-assertion#43444</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12809<br /><strong>Posted:</strong> 05 December 2008 at 3:43am<br /><br /><P>Hi,</P><DIV>Create demo project, reproduce problem and attach here. With this stack I have no idea what actually you do.</DIV><DIV>Or better just follow our samples.</DIV>]]>
   </description>
   <pubDate>Fri, 05 Dec 2008 03:43:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12809&amp;PID=43444&amp;title=dockingpane-wincore-assertion#43444</guid>
  </item> 
  <item>
   <title><![CDATA[DockingPane wincore assertion :  I checked ActivePaneView sample...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12809&amp;PID=43360&amp;title=dockingpane-wincore-assertion#43360</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1813">Paolo</a><br /><strong>Subject:</strong> 12809<br /><strong>Posted:</strong> 02 December 2008 at 6:27am<br /><br />I checked ActivePaneView sample as you suggested. There's code to create a pane and to attach a dialog to it. But I can't find any way to show that pane.<br>In my application the debug assertion is displayed only after I've shown the pane attached to the dialog.<br><br>Methods<br>- CWnd::AssertValid<br>- AfxAssertValidObject<br>- CCmdTarget::GetIDispatch<br><br>are called on a "CXTPDockingPaneTabbedContainer" instance.<br><br>As a note: in CCmdTarget::GetIDispatch the failing instruction is<br>ASSERT_VALID(this);<br>(in my previous post I pointed a row below)<br>]]>
   </description>
   <pubDate>Tue, 02 Dec 2008 06:27:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12809&amp;PID=43360&amp;title=dockingpane-wincore-assertion#43360</guid>
  </item> 
  <item>
   <title><![CDATA[DockingPane wincore assertion : Hi,  Do you see it with some...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12809&amp;PID=43260&amp;title=dockingpane-wincore-assertion#43260</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12809<br /><strong>Posted:</strong> 27 November 2008 at 2:26pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Do you see it with some our sample ? ActivePaneView also has attached dialog - please check it.</DIV>]]>
   </description>
   <pubDate>Thu, 27 Nov 2008 14:26:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12809&amp;PID=43260&amp;title=dockingpane-wincore-assertion#43260</guid>
  </item> 
  <item>
   <title><![CDATA[DockingPane wincore assertion : I Created a Dialog and attached...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12809&amp;PID=43250&amp;title=dockingpane-wincore-assertion#43250</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1813">Paolo</a><br /><strong>Subject:</strong> 12809<br /><strong>Posted:</strong> 27 November 2008 at 8:19am<br /><br />I Created a Dialog and attached it to a DockingPane.<br>When I show that pane I get a false assertion in wincore.cpp. This happens in debug version.<br>When I show that pane in the release version my application crashes.<br><br>I have no idea of what could be wrong, looking at methods name I feel that is something related to parent pointer, but it's just a feeling.<br><br>Here's my call stack:<br><br>- mfc90d.dll!CWnd::AssertValid()&nbsp; Row 900 + 0x19 byte&nbsp;&nbsp; &nbsp;C++<br>- mfc90d.dll!AfxAssertValidObject(const CObject * pOb=0x0859fe40, const char * lpszFileName=0x643dd0cc, int nLine=399)&nbsp; Row 107&nbsp;&nbsp; &nbsp;C++<br>- mfc90d.dll!CCmdTarget::GetIDispatch(int bAddRef=1)&nbsp; Row 400&nbsp;&nbsp; &nbsp;C++<br>- ToolkitPro1200vc90D.dll!CXTPDockingPane::GetAccessibleParent(IDispatch * * ppdispParent=0x0c008b58)&nbsp; Row 408 + 0x3d byte&nbsp;&nbsp; &nbsp;C++<br>- ToolkitPro1200vc90D.dll!CXTPAccessible::XAccessible::get_accParent(IDispatch * * ppdispParent=0x0c008b58)&nbsp; Row 621 + 0x13 byte&nbsp;&nbsp; &nbsp;C++<br><br>and here I copied these methods code (call stack line of each method is highlighted by "// this is the row")<br><br><table width="99%"><tr><td><pre class="BBcode"><br>void CWnd::AssertValid() const<br>{<br>&nbsp;&nbsp; &nbsp;if (m_hWnd == NULL)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;&nbsp;&nbsp;&nbsp;&nbsp; // null (unattached) windows are valid<br><br>&nbsp;&nbsp; &nbsp;// check for special wnd??? values<br>&nbsp;&nbsp; &nbsp;ASSERT(HWND_TOP == NULL);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // same as desktop<br>&nbsp;&nbsp; &nbsp;if (m_hWnd == HWND_BOTTOM)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ASSERT(this == &amp;CWnd::wndBottom);<br>&nbsp;&nbsp; &nbsp;else if (m_hWnd == HWND_TOPMOST)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ASSERT(this == &amp;CWnd::wndTopMost);<br>&nbsp;&nbsp; &nbsp;else if (m_hWnd == HWND_NOTOPMOST)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ASSERT(this == &amp;CWnd::wndNoTopMost);<br>&nbsp;&nbsp; &nbsp;else<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// should be a normal window<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ASSERT(::IsWindow(m_hWnd));<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// should also be in the permanent or temporary handle map<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;CHandleMap* pMap = afxMapHWND();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ASSERT(pMap != NULL);&nbsp;&nbsp;&nbsp;&nbsp; // this is the row<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;CObject* p=NULL;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(pMap)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ASSERT( (p = pMap-&gt;LookupPermanent(m_hWnd)) != NULL ||<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;(p = pMap-&gt;LookupTemporary(m_hWnd)) != NULL);<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ASSERT((CWnd*)p == this);&nbsp;&nbsp; // must be us<br><br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// Note: if either of the above asserts fire and you are<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// writing a multithreaded application, it is likely that<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// you have passed a C++ object from one thread to another<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// and have used that object in a way that was not intended.<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// (only simple inline wrapper functions should be used)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// In general, CWnd objects should be passed by HWND from<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// one thread to another.&nbsp; The receiving thread can wrap<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// the HWND with a CWnd object by using CWnd::FromHandle.<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// It is dangerous to pass C++ objects from one thread to<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// another, unless the objects are designed to be used in<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// such a manner.<br>&nbsp;&nbsp; &nbsp;}<br>}<br><br>void AFXAPI AfxAssertValidObject(const CObject* pOb,<br>&nbsp;&nbsp; &nbsp;LPCSTR lpszFileName, int nLine)<br>{<br>&nbsp;&nbsp; &nbsp;if (pOb == NULL)<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;TRACE(traceAppMsg, 0, "ASSERT_VALID fails with NULL pointer.\n");<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (AfxAssertFailedLine(lpszFileName, nLine))<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;AfxDebugBreak();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;&nbsp;&nbsp;&nbsp;&nbsp; // quick escape<br>&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;if (!AfxIsValidAddress(pOb, sizeof(CObject)))<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;TRACE(traceAppMsg, 0, "ASSERT_VALID fails with illegal pointer.\n");<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (AfxAssertFailedLine(lpszFileName, nLine))<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;AfxDebugBreak();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;&nbsp;&nbsp;&nbsp;&nbsp; // quick escape<br>&nbsp;&nbsp; &nbsp;}<br><br>&nbsp;&nbsp; &nbsp;// check to make sure the VTable pointer is valid<br>&nbsp;&nbsp; &nbsp;ASSERT(sizeof(CObject) == sizeof(void*));<br>&nbsp;&nbsp; &nbsp;if (!AfxIsValidAddress(*(void**)pOb, sizeof(void*), FALSE))<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;TRACE(traceAppMsg, 0, "ASSERT_VALID fails with illegal vtable pointer.\n");<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (AfxAssertFailedLine(lpszFileName, nLine))<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;AfxDebugBreak();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;&nbsp;&nbsp;&nbsp;&nbsp; // quick escape<br>&nbsp;&nbsp; &nbsp;}<br><br>&nbsp;&nbsp; &nbsp;if (!AfxIsValidAddress(pOb, pOb-&gt;GetRuntimeClass()-&gt;m_nObjectSize, FALSE))<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;TRACE(traceAppMsg, 0, "ASSERT_VALID fails with illegal pointer.\n");<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (AfxAssertFailedLine(lpszFileName, nLine))<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;AfxDebugBreak();<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;&nbsp;&nbsp;&nbsp;&nbsp; // quick escape<br>&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;pOb-&gt;AssertValid();&nbsp;&nbsp;&nbsp;&nbsp; // this is the row<br>}<br><br>// return addref'd IDispatch part of CCmdTarget object<br>LPDISPATCH CCmdTarget::GetIDispatch(BOOL bAddRef)<br>{<br>&nbsp;&nbsp; &nbsp;ASSERT_VALID(this);<br>&nbsp;&nbsp; &nbsp;ASSERT(m_xDispatch.m_vtbl != 0);&nbsp;&nbsp;&nbsp; // forgot to call EnableAutomation?&nbsp;&nbsp; // this is the row<br><br>&nbsp;&nbsp; &nbsp;// AddRef the object if requested<br>&nbsp;&nbsp; &nbsp;if (bAddRef)<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ExternalAddRef();<br><br>&nbsp;&nbsp; &nbsp;// return pointer to IDispatch implementation<br>&nbsp;&nbsp; &nbsp;return (LPDISPATCH)GetInterface(&amp;IID_IDispatch);<br>}<br><br>HRESULT CXTPDockingPane::GetAccessibleParent(IDispatch* FAR* ppdispParent)<br>{<br>&nbsp;&nbsp; &nbsp;SAFE_MANAGE_STATE(m_pModuleState);<br><br>&nbsp;&nbsp; &nbsp;*ppdispParent = NULL;<br><br>&nbsp;&nbsp; &nbsp;if (m_pParentContainer)<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;*ppdispParent = ((CXTPDockingPaneTabbedContainer*)m_pParentContainer)-&gt;GetIDispatch(TRUE);&nbsp;&nbsp;&nbsp; // this is the row<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return S_OK;<br>&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;return E_FAIL;<br>}<br><br>STDMETHODIMP CXTPAccessible::XAccessible::get_accParent(IDispatch* FAR* ppdispParent)<br>{<br>&nbsp;&nbsp; &nbsp;TRACE_ACCESSIBLE(_T("get_accParent\n"));<br>&nbsp;&nbsp; &nbsp;METHOD_PROLOGUE_EX_(CXTPAccessible, ExternalAccessible);<br><br>&nbsp;&nbsp; &nbsp;return pThis-&gt;GetAccessibleParent(ppdispParent);&nbsp;&nbsp;&nbsp; // this is the row<br>}<br></pre></td></tr></table>]]>
   </description>
   <pubDate>Thu, 27 Nov 2008 08:19:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12809&amp;PID=43250&amp;title=dockingpane-wincore-assertion#43250</guid>
  </item> 
 </channel>
</rss>