BUG: Read-Only .DEF File Can Cause General Protection Fault

Last reviewed: July 22, 1997
Article ID: Q116317
1.00 1.50 WINDOWS kbtool kbbuglist

The information in this article applies to:

  • The Visual Workbench, included with: Microsoft Visual C++ for Windows, versions 1.0 and 1.5

SYMPTOMS

When you use the Microsoft Visual Workbench version 1.0 or 1.5 to load a read-only .DEF file that has the end of file marker (<EOF>) just following the last character on the last line, an application error may occur. The following error message may be generated:

        Application Error

     MSVC caused a General Protection Fault in module
     MSVC.EXE at 0002:004F6

RESOLUTION

The workaround for this is either to move the <EOF> marker to a new line at the end of the file or to remove the read-only attribute from the file.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. This is not a problem in Visual C++, 32-bit Edition.

MORE INFORMATION

The following sample .DEF file shows where the <EOF> marker causes the problem, but the problem can occur with any project's .DEF file. To reproduce this problem, use the following steps:

  1. Use Notepad to save the Sample .DEF file below. Notice where the <EOF> marker is located.

  2. In File Manager, select the .DEF file and change the file's attribute to "Read only" by selecting Properties from the File menu.

  3. Load the .DEF file. If the read-only attribute has been set, "READ" should be visible on the status bar in the Visual Workbench.

  4. Press CTRL+END to move the cursor to the end of the file.

  5. Press RETURN twice. The Visual Workbench should generate the error message at this time.

Sample .DEF File

   LIBRARY      Sample
   DESCRIPTION  'Sample'
   EXETYPE      WINDOWS
   CODE          PRELOAD MOVEABLE DISCARDABLE
   DATA          MOVEABLE SINGLE
   HEAPSIZE     1024
   EXPORTS
       WEP
       SAMPLE
            ;^- If <EOF> is here and READONLY may cause GPF in VWB


Additional reference words: 1.00 1.50
KBCategory: kbtool kbbuglist
KBSubcategory: VWBIss
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.