<?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 : Debug Assertion Failed!</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Debug Assertion Failed!]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 01 May 2026 19:31:05 +0000</pubDate>
  <lastBuildDate>Sun, 26 Dec 2010 13:57:54 +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=17708</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[Debug Assertion Failed! :      oleg wrote:Standard thing....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17708&amp;PID=62002&amp;title=debug-assertion-failed#62002</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6515">tomay3000</a><br /><strong>Subject:</strong> 17708<br /><strong>Posted:</strong> 26 December 2010 at 1:57pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by oleg" alt="Originally posted by oleg" style="vertical-align: text-bottom;" /> <strong>oleg wrote:</strong><br /><br />Standard thing. If you compile statically you must add MFC/Toolkit resources to your resources<div><br></div><div>open res\&#091;app&#093;.rc2 file and add line</div><div><br></div><div>#include "AFXRES.RC"</div></td></tr></table><br><br>The "afxres.rc" file is already included. Thank you for your help, but I found the solution:<br><br>Debug Assertion Failed! - <strong>Solved</strong><br><br>I did many tests to reach to this solution. So what did I do!?<br><br>I created a sample <strong>SDI</strong> application &amp; named it as <strong>FR</strong> using the Xtreme ToolkitPro 2009 (13.4.2) AppWizard &amp; I choosed the <strong>French (France) (APPWZFRA.DLL)</strong> to include French resources, &amp; <strong>link the MFC statically</strong>. When the project is created, I built it to create the executable file.<br><br>In the project directory you should see the <strong>Debug</strong> or the <strong>Release</strong> folder, depending on your project configuration. Enter that folder, &amp; now you should see an <strong>.res</strong> file. In my case it's <strong>FR.res</strong>.<br><br>I am using <strong>Restorator 2007</strong> as my default <strong>Resource Editor</strong>. So I opened <strong>FR.res</strong> file using it, &amp; I searched for the string <strong>"sans nom"</strong> which means <strong>"Untitled"</strong> in English. I found it in the <strong>English (United States)</strong> String resources as you see in the image below. But that string &amp; all other <strong>French</strong> strings should be in the <strong>French (France)</strong> String resources!!! That’s strange!<br><img src="uploads/6515/FR1.JPG" border="0" /><br><br>Now open the <strong>.rc</strong> file from the main project directory with a text editor. In my case it's <strong>FR.rc</strong>. &amp; scroll to the end of page, you should see this part of code:<br><table width="99%"><tr><td><pre class="BBcode">#ifndef APSTUDIO_INVOKED<br>/////////////////////////////////////////////////////////////////////////////<br>//<br>// Generated from the TEXTINCLUDE 3 resource.<br>//<br><br>#define _AFX_NO_SPLITTER_RESOURCES<br>#define _AFX_NO_OLE_RESOURCES<br>#define _AFX_NO_TRACKER_RESOURCES<br>#define _AFX_NO_PROPERTY_RESOURCES<br><br>#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)<br>#ifdef _WIN32<br>LANGUAGE 12, 1<br>#pragma code_page(1252)<br>#endif //_WIN32<br>#include "res\\FR.rc2"&nbsp; // non-Microsoft Visual C++ edited resources &lt;------------------------------ This is our nightmare :(<br>#include "l.fra\\afxres.rc"&nbsp; &nbsp;&nbsp;&nbsp; // Standard components<br>#include "l.fra\\afxprint.rc"&nbsp; // printing/print preview resources<br>#endif<br><br>#endif&nbsp;&nbsp;&nbsp; // not APSTUDIO_INVOKED</pre></td></tr></table><br><br>The line:<br><table width="99%"><tr><td><pre class="BBcode">#include "res\\FR.rc2"&nbsp; // non-Microsoft Visual C++ edited resources</pre></td></tr></table><br>Should be moved to the end as follows:<br><table width="99%"><tr><td><pre class="BBcode">#ifndef APSTUDIO_INVOKED<br>/////////////////////////////////////////////////////////////////////////////<br>//<br>// Generated from the TEXTINCLUDE 3 resource.<br>//<br><br>#define _AFX_NO_SPLITTER_RESOURCES<br>#define _AFX_NO_OLE_RESOURCES<br>#define _AFX_NO_TRACKER_RESOURCES<br>#define _AFX_NO_PROPERTY_RESOURCES<br><br>#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)<br>#ifdef _WIN32<br>LANGUAGE 12, 1<br>#pragma code_page(1252)<br>#endif //_WIN32<br>#include "l.fra\\afxres.rc"&nbsp; &nbsp;&nbsp;&nbsp; // Standard components<br>#include "l.fra\\afxprint.rc"&nbsp; // printing/print preview resources<br>#include "res\\FR.rc2"&nbsp; // non-Microsoft Visual C++ edited resources &lt;------------------------------ No nightmares anymore ;)<br>#endif<br><br>#endif&nbsp;&nbsp;&nbsp; // not APSTUDIO_INVOKED</pre></td></tr></table><br><br>This is because, if we open the file <strong>FR.rc2</strong> from the <strong>res</strong> folder, we should see this code:<br><table width="99%"><tr><td><pre class="BBcode">//<br>// FR.RC2 - resources Microsoft Visual C++ does not edit directly<br>//<br><br>#ifdef APSTUDIO_INVOKED<br>&nbsp;&nbsp;&nbsp; #error this file is not editable by Microsoft Visual C++<br>#endif //APSTUDIO_INVOKED<br><br>#include &lt;XTToolkitPro.rc&gt; &lt;------------------------------ Xtreme ToolkitPro 2009 (13.4.2) <strong>English (United States)</strong> resources are included first :(<br><br>/////////////////////////////////////////////////////////////////////////////<br>// Add manually edited resources here...<br><br>/////////////////////////////////////////////////////////////////////////////</pre></td></tr></table><br>&amp; the rest of resources inclusion will be appended to the <strong>English (United States)</strong> resources.<br><br>Now save the edited <strong>FR.rc</strong> file &amp; rebuild your project. Then, open again <strong>FR.res</strong> file with an <strong>Resource Editor</strong>. Search for the string <strong>"sans nom"</strong>. Now it should be in the <strong>French (France)</strong> String resources as shown in the image below.<br><img src="uploads/6515/FR2.JPG" border="0" /><br><br>That's all. &amp; I hope that you have understood, sorry for my bad English ;)<br><br>]]>
   </description>
   <pubDate>Sun, 26 Dec 2010 13:57:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17708&amp;PID=62002&amp;title=debug-assertion-failed#62002</guid>
  </item> 
  <item>
   <title><![CDATA[Debug Assertion Failed! : Standard thing. If you compile...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17708&amp;PID=61935&amp;title=debug-assertion-failed#61935</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 17708<br /><strong>Posted:</strong> 21 December 2010 at 4:50am<br /><br />Standard thing. If you compile statically you must add MFC/Toolkit resources to your resources<div><br></div><div>open res\&#091;app&#093;.rc2 file and add line</div><div><br></div><div>#include "AFXRES.RC"</div>]]>
   </description>
   <pubDate>Tue, 21 Dec 2010 04:50:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17708&amp;PID=61935&amp;title=debug-assertion-failed#61935</guid>
  </item> 
  <item>
   <title><![CDATA[Debug Assertion Failed! :  When I use MFC as Statically...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17708&amp;PID=61933&amp;title=debug-assertion-failed#61933</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6515">tomay3000</a><br /><strong>Subject:</strong> 17708<br /><strong>Posted:</strong> 20 December 2010 at 6:35pm<br /><br />When I use <b>MFC</b> as <b>Statically Linked Library</b>, a Debug Assertion Failure message box containing the following code in my app::InitInstance appears:<br><br><b>generated debug assertion<br>	if (!ProcessShellCommand(cmdInfo))<br>		return FALSE;<br>  -- File: docsingl.cpp<br>     Line: 215</b><br><br>However when using<b> MFC</b> as <b>Shared DLL,</b> this error is  not coming and I'll get my window.<br>I am confused to figure out why !?<br><br>I have traced out that my program is failing at the big line of the following code:<br><br><b>void CSingleDocTemplate::SetDefaultTitle(CDocument* pDocument)<br>{<br>&nbsp;&nbsp;&nbsp; CString strDocName;<br>&nbsp;&nbsp;&nbsp; if (!GetDocString(strDocName, CDocTemplate::docName) ||<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; strDocName.IsEmpty())<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // use generic 'untitled'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="4"> </font><font face="Arial, Helvetica, sans-serif" size="4">VERIFY(strDocName.LoadString(AFX_IDS_UNTITLED));</font><br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; pDocument-&gt;SetTitle(strDocName);<br>}</b><br><br>If I use the <b>AFX_IDS_UNTITLED</b> in the resource string table &amp; everything goes fine.<br><br>I don't want to do this.<br>Even if you don't use it in the string table, it should have worked fine. because <b>AFX_IDS_UNTITLED</b> is defined in <b>afxres.h</b> &amp; the resource file uses this header file.<br><br>Other projects that do not use <b>AFX_IDS_UNTITLED</b> in the string table resource are working fine.<br><br>So I opened the compiled <b>EXE</b> file with a <b>Resource Editor</b>, I searched for the missing string. I found that is was right there: <font size="3"><b>"sans nom"</b></font> in <b>FRENCH</b> cause I build my project with <b>FRENCH</b> <b>AppWizard</b>.<br><br>I recreated my project using the <b>ENGLISH</b>, <b>DEUTCH</b>, <b>SPANISH</b> &amp; <b>ITALIC</b> <b>AppWizard</b>, &amp; figured out that the problem has gone.<br><br>&amp; I thought that the problem is due to my system: <b><font size="4">"Windows XP Pro SP3 FRENCH Edition"</font></b>,&nbsp; so I reinstalled the system that time: <b><font size="4">"Windows XP Pro SP3 ENGLISH Edition"</font></b>, &amp; figured out that all the problems has gone, &amp; all the projects created using the <b>ENGLISH</b>, <b>FRENCH</b>, <b>DEUTCH</b>, <b>SPANISH</b> &amp; <b>ITALIC</b> <b>AppWizard</b> are working perfectly.<br><br>The problem is that I don't want to install <b><font size="4">"Windows XP Pro SP3 ENGLISH Edition".</font></b><br><br>Any ideas? Help me		<font size="7">Please</font> <img src="http://forum.codejock.com/smileys/smiley19.gif" border="0" alt="Cry" title="Cry" />]]>
   </description>
   <pubDate>Mon, 20 Dec 2010 18:35:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17708&amp;PID=61933&amp;title=debug-assertion-failed#61933</guid>
  </item> 
 </channel>
</rss>