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

ID: Q116317

1.00 1.50 WINDOWS kbtool kbbuglist

The information in this article applies to:

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

Last Reviewed: July 23, 1997