Q154111: FIX: Access Violation Opening a Workspace of Type Makefile

Article: Q154111
Product(s): Microsoft C Compiler
Version(s): 4.0,4.1,4.2,5.0,6.0
Operating System(s): 
Keyword(s): kbide kbVC kbVC410bug kbVC420bug kbVC500bug kbVC600bug kbGrpDSTools kbNoUpdate
Last Modified: 11-FEB-2002

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual C++, versions 4.0, 4.1 
- Microsoft Visual C++, 32-bit Enterprise Edition, versions 4.2, 5.0, 6.0 
- Microsoft Visual C++, 32-bit Professional Edition, versions 4.2, 5.0, 6.0 
- Microsoft Visual C++, 32-bit Learning Edition, version 6.0 
-------------------------------------------------------------------------------

SYMPTOMS
========

Sometimes when you open a Visual C++ generated makefile that has been modified
(either by you or corrupted by the system), Developer Studio generates a fatal
application error (illegal operation, access violation, gpf, page fault).

CAUSE
=====

Visual C++ uses the makefile to store project information and is sensitive to
changes in the format of the file.

RESOLUTION
==========

When you edit a makefile generated by Visual C++, delete the first few lines of
the makefile. These lines are comments that Visual C++ uses to identify
makefiles that are generated by Visual C++. When those lines are deleted, Visual
C++ will not attempt to parse the makefile.

If your makefile has become corrupted (you get a fatal error and you haven't
edited the makefile), then you must restore the makefile from a backup, if you
have one, or re-create the project.

STATUS
======

Microsoft has confirmed this to be a bug in the Microsoft products listed at the
beginning of this article.

This problem was corrected in Microsoft Visual C++ .NET.

MORE INFORMATION
================

The point at which Developer Studio crashes varies. Sometimes the makefile is
partially read in and then the crash occurs. Sometimes the makefile is partially
read in and then you are be prompted:

  This makefile was not generated by Developer Studio. Continuing will create a
  new Developer Studio workspace to wrap this makefile.

After you click Yes, the crash occurs.

NOTE: In Visual C++, version 5.0 and later, after you click Yes, a workspace with
only one project is generated. The project has only one file, which is the
makefile. This means that the makefile is not being parsed at all. (The comments
are not being taken into account.) However, this does not crash Developer
Studio.

Additional query words: gpf crash access violation

======================================================================
Keywords          : kbide kbVC kbVC410bug kbVC420bug kbVC500bug kbVC600bug kbGrpDSTools kbNoUpdate 
Technology        : kbVCsearch kbVC400 kbAudDeveloper kbVC410 kbVC420 kbVC500 kbVC600 kbVC32bitSearch kbVC500Search
Version           : :4.0,4.1,4.2,5.0,6.0
Issue type        : kbbug
Solution Type     : kbfix

=============================================================================