Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: StackOverflowException causes crash in TFS 2013 Update 4 when you use CodeLens in Visual Studio Ultimate 2013 RTM


View products that this article applies to.

Symptoms

You use Visual Studio Ultimate 2013 RTM to connect to Team Foundation Server (TFS) 2013 Update 4. Assume that you open a Visual C# or Visual Basic file that is previously renamed in the following ways:
  • Only the case of the file name is changed, for example, Filename.cs versus filename.cs.
  • The file is renamed in the last 12 months. This is the default time period for indexing change history. See CodeIndex Command (indexHistoryPeriod setting).
In this situation, you receive a StackOverflowException exception that occurs in Microsoft.TeamFoundation.CodeSense.Server.WebAPI.CodeLensFileSummariesControllerBase.ReadFileSummaries, and then a crash happens in IIS worker process "w3wp" of TFS.

Note This crash affects all current operations on TFS. However, the "w3wp" IIS worker process will restart automatically, and all other operations will run correctly if it restarts. If you try to reconnect Visual Studio Ultimate RTM to TFS, this causes another StackOverflowException exception and a crash.

↑ Back to the top


Cause

This issue happens because, when you open the code file in Visual Studio, Visual Studio asks TFS for CodeLens information. The CodeLens component in TFS causes a StackOverflowException exception, and then causes the crash of IIS worker process "w3wp" in TFS, not Visual Studio.

↑ Back to the top


Resolution

To resolve this issue, apply Visual Studio 2013 Update 2 or a later update from the Visual Studio downloads.
You can also upgrade TFS with Team Foundation Server 2013 Update 5 or Team Foundation Server 2015 RTM. It is available from Visual Studio downloads.

↑ Back to the top


Workaround

To work around this issue, turn off CodeLens in Visual Studio Ultimate 2013 RTM. Go to Tools > Options > Text Editor > All Languages > CodeLens.

Note If the options in the Resolution and Workaround sections do not work, you can turn off CodeLens in TFS by using the CodeIndex command with the TFSConfig command. This is the least preferred option.

↑ Back to the top


More Information

To help us make CodeLens better for you, send feedback or request features at Visual Studio UserVoice, or ask questions in the MSDN forums.

↑ Back to the top


Status

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

↑ Back to the top


Keywords: kbsurveynew, kbexpertiseadvanced, atdownload, kbfix, kb

↑ Back to the top

Article Info
Article ID : 3037079
Revision : 1
Created on : 1/7/2017
Published on : 9/23/2015
Exists online : False
Views : 176