BUG: "Debug Assertion Failed" Dialog Box When You Build an MFC Application with "Container/Full Server" Compound Document Support (315476)



The information in this article applies to:

  • Microsoft Visual C++ .NET (2002)
  • Microsoft Visual C++ .NET (2003)

This article was previously published under Q315476

SYMPTOMS

When you build a Microsoft Foundation Classes (MFC) application with "container/full server" compound document support, you may receive a Debug Assertion Failed dialog box with contents similar to the following:
Program: i:\content\GenAssert\Debug\GenAssert.exe
File: docmgr.cpp
Line: 339
After you click Retry, a Send error report dialog box is displayed.

CAUSE

This behavior occurs if the string resource that is generated for the document template is missing a "." character.

The wizard-generated string resource is as follows:

MyCLass\nMyCLass\nMyCLass\nMyCLass Files
*.myc)\nmyc\nMyCLass.Document\nMyCLass Document

This resource should be as follows:

MyCLass\nMyCLass\nMyCLass\nMyCLass Files
*.myc)\n.myc\nMyCLass.Document\nMyCLass Document

NOTE: The missing "." character in the wizard-generated version is in the "nmyc" section of the string.

RESOLUTION

To work around this issue, manually edit the resource (*.rc) file to add the "." character.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Problem

  1. Create an MFC application named "GenAssert" with "container/full server" compound document support.
  2. Set the file extension as "xxx" under Document Template Strings.
  3. Enable automation under Advanced Features.
  4. Add an MFC class to the project.
  5. Set the class name as MyClass.
  6. Set the Base Class value as CFormView.
  7. Click to select the Generate DocTemplate resources check box.
  8. Build the project. You receive a dialog box similar to the one described in the "Symptoms" section of this article.

Modification Type:MajorLast Reviewed:4/11/2003
Keywords:kbbug kberrmsg kbfix kbwizard KB315476