Microsoft KB Archive/326015

From BetaArchive Wiki

Article ID: 326015

Article Last Modified on 8/26/2005



APPLIES TO

  • Microsoft Visual SourceSafe 6.0C, when used with:
    • Microsoft Visual Studio .NET 2002 Professional Edition
    • Microsoft Visual Studio .NET 2002 Enterprise Architect
    • Microsoft Visual Studio .NET 2002 Enterprise Developer
    • Microsoft Visual Studio .NET 2003 Professional Edition
    • Microsoft Visual Studio .NET 2003 Enterprise Architect
    • Microsoft Visual Studio .NET 2003 Enterprise Developer



This article was previously published under Q326015

SYMPTOMS

If you add a resource file (such as an icon, a bitmap, or a cursor) to a Microsoft Visual C++ .NET project that is under source code control, after you are prompted to check out the resource (.rc) file for editing, you may receive the following application error messages:

Microsoft Development Environment has encountered a problem and needs to close.

-and-


devenv.exe - application error : "memory could not be read"

CAUSE

This problem occurs if another developer has added a new resource file to the project. When you try to add a new resource, the resource file (*.rc) is checked out for editing from source control. As a result, the latest copy of the resource (.rc) file is copied to the developer's workstation, and the resource file that is added (for example, the icon or the bitmap) is not retrieved. Because the project now references a missing item, the local instance of the project cannot be compiled, which causes the error messages in the "Symptoms" section of this article when you try to save the project.

RESOLUTION

To work around this behavior, use the Get Latest Version command on the project before you add any new resource items. This makes sure that you have copies of all of the files that the project needs (including any resource files that are newly added) before you add new resource items to the project.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Create a new Win32 Application project in Visual C++ .NET.
  2. In Solution Explorer, right-click the solution, click Add Solution to Source Control, and then make sure that all of the items are checked in.
  3. From another workstation, on the File menu, click Source Control, and then click Open from Source Control.
  4. On the first workstation, follow these steps to add a new icon to the project in Resource view:
    1. On the View menu, click Resource View.
    2. In the Resource View window, right-click the Icon folder, and then click Add Resource.
    3. In the Add Resource dialog box, click Icon, and then click New.
  5. Check in all changes that you made on the first workstation.
  6. On the second workstation, repeat steps 4a through 4c to add a new icon to the project in Resource view.
  7. When you are prompted to check out the file for editing, click OK for all of the dialog boxes that appear. Make sure that you click Yes when you are prompted to reload the changes outside the IDE.

    Notice that the .rc file does not load because there is a missing file on disk (which is the new icon file that you added in step 4).
  8. Click Save All. Notice that you receive the error messages that are listed in the "Symptoms" section of this article and that the Visual Studio .NET IDE closes with an application error.


Keywords: kbbug kbpending kbvs2002sp1sweep KB326015