BUG: Read-Only .DEF File Can Cause General Protection Fault
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 () 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 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 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
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 is here and READONLY may cause GPF in VWB
Additional reference words: 1.00 1.50
KBCategory: kbtool kbbuglist
KBSubcategory: VWBIss