Microsoft KB Archive/326015

= FIX: Visual Studio .NET IDE crashes when multiple developers are working on the same resource file =

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</li></ul>

 Microsoft Visual Studio .NET 2003 Enterprise Architect</li></ul>

 Microsoft Visual Studio .NET 2003 Enterprise Developer</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q326015

<div class="symptoms_section">

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 : &quot;memory could not be read&quot;

<div class="cause_section">

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 &quot;Symptoms&quot; section of this article when you try to save the project.

<div class="resolution_section">

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.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

Steps to Reproduce the Behavior
<ol> Create a new Win32 Application project in Visual C++ .NET.</li> 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.</li> From another workstation, on the File menu, click Source Control, and then click Open from Source Control.</li> On the first workstation, follow these steps to add a new icon to the project in Resource view: <ol style="list-style-type: lower-alpha;"> On the View menu, click Resource View.</li> In the Resource View window, right-click the Icon folder, and then click Add Resource.</li> In the Add Resource dialog box, click Icon, and then click New.</li></ol> </li> Check in all changes that you made on the first workstation.</li> On the second workstation, repeat steps 4a through 4c to add a new icon to the project in Resource view.</li> 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).</li> Click Save All. Notice that you receive the error messages that are listed in the &quot;Symptoms&quot; section of this article and that the Visual Studio .NET IDE closes with an application error.</li></ol>

Keywords: kbbug kbpending kbvs2002sp1sweep KB326015

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.