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

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.
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.
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.
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.
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.
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Properties

Article ID: 3037079 - Last Review: 09/23/2015 06:22:00 - Revision: 6.0

Microsoft Visual Studio Ultimate 2013

  • kbsurveynew kbexpertiseadvanced atdownload kbfix KB3037079
Feedback