Last post Jul 29, 2015 01:09 PM by ckelley
Jan 23, 2014 01:06 PM|ripvannwinkler|LINK
Every single time I CTRL+K, CTRL+D on the following document, VS 2013 crashes. It did this before I applied update 1, and still does after.
I have zero clue what's causing it. Any thoughts?
The error details are:
Problem Event Name: CLR20r3
Problem Signature 01: devenv.exe
Problem Signature 02: 12.0.30110.0
Problem Signature 03: 52cfb65a
Problem Signature 04: Microsoft.VisualStudio.Platform.VSEditor
Problem Signature 05: 12.0.21005.1
Problem Signature 06: 524fcbc8
Problem Signature 07: 1ba1
Problem Signature 08: 21
Problem Signature 09: System.InvalidOperationException
OS Version: 6.3.9600.2.0.0.256.48
Locale ID: 1033
Additional Information 1: 5861
Additional Information 2: 5861822e1919d7c014bbb064c64908b2
Additional Information 3: 01d7
Additional Information 4: 01d7340064827245f2249cd1f1a7c264
Jan 23, 2014 01:16 PM|Rion Williams|LINK
This only crashes within the actual Visual Studio IDE itself or when the application is running?
Jan 23, 2014 01:21 PM|ripvannwinkler|LINK
This is an IDE problem only. At runtime, the view is fine and causes no parsing errors.
Jan 23, 2014 01:25 PM|Rion Williams|LINK
I can't seem to reproduce it locally using Visual Studio 2013 Update 1.
Have you tried restarting Visual Studio or possibly running it as an Administrator (Right-click > Run as Administrator) to see if the issue still persists?
Jan 23, 2014 01:30 PM|ripvannwinkler|LINK
I had tried restarting (obviously, since it crashed). I also just tried running as administrator. This seems to be failing on several cshtml files, not just the one I posted.
Jan 23, 2014 02:55 PM|Rion Williams|LINK
Are all of these errors limited to a single project or have you tried to see if you experience the same problem within other projects as well?
I would ensure that you have all of the most recent updates for Visual Studio 2013 (and are not running a pre-release or beta version) and if the issue persists, you may want to consider re-installing or "cleaning" your existing Visual Studio installation
as it sounds like something could be corrupted.
Jan 26, 2014 12:10 AM|Ruchira|LINK
This seems to be failing on several cshtml files, not just the one I posted.
Make sure you meet the minimum system requirements to run visual studio 2013.
Expand the System Requirements and see. Though it says minimum 1GB ram, I would recommend you to have atleast 2GB of ram since you are working on ASP.NET.
Please 'Mark as Answer' if this post helps you
Jan 30, 2014 08:57 AM|NathalieLarsson|LINK
I have the exact same problem with my Visual Studio 2013 Professional. (Only when I work on .cshtml views in MVC/web projects)
It crashes when I:
I have tried this so far but nothing helped:
I work with VS 2013 daily and this happens 5-10 times a day and it's on many different projects.
Computer specs (should be enough) :
Jan 30, 2014 03:56 PM|ripvannwinkler|LINK
I'm still having this problem, on multiple computers and various projects. Here's one, for example, that causes the crash every single time, on at least 2 different computers running Windows 8.1
Info from the devenv log file:
<?xml version="1.0" encoding="utf-16"?>
<?xml-stylesheet type="text/xsl" href="ActivityLog.xsl"?>
<!-- snip -->
<description>System.InvalidOperationException: Inconsistent line count calculation in projection snapshot.
at Microsoft.VisualStudio.Text.Projection.Implementation.ElisionMap.IncorporateChanges(INormalizedTextChangeCollection sourceChanges,
FrugalList`1 projectedChanges, ITextSnapshot beforeSourceSnapshot, ITextSnapshot sourceSnapshot, ITextSnapshot beforeElisionSnapshot)
at Microsoft.VisualStudio.Text.Projection.Implementation.ElisionBuffer.PropagateSourceChanges(EditOptions options, Object editTag)
at Microsoft.VisualStudio.Text.Implementation.BufferGroup.PerformMasterEdit(ITextBuffer buffer, ISubordinateTextEdit
xedit, EditOptions options, Object editTag)
at Microsoft.Web.Editor.IncrementalTextChangeApplication.ApplyChange(ITextBuffer textBuffer, Int32 position, Int32 length, String newText, String transactionName, ISelectionTracker selectionTracker, Int32 maxMilliseconds, Func`2 isDelimiter)
at Microsoft.Html.Editor.Formatting.HtmlEditorFormatter.Format(ITextView textView, ITextBuffer textBuffer)
at Microsoft.Html.Editor.Formatting.FormatDocumentCommand.Invoke(Guid group, Int32 id, Object inputArg, Object& outputArg)
at Microsoft.Web.Editor.Controller.Invoke(Guid group, Int32 id, Object inputArg, Object& outputArg)
at Microsoft.Web.Editor.ViewController.Invoke(Guid group, Int32 id, Object inputArg, Object& outputArg)
group, Int32 id, Object inputArg, Object& outputArg)
at Microsoft.VisualStudio.Html.Interop.CommandTargetToOleShim.Exec(Guid& guidCommandGroup, UInt32 commandID, UInt32 commandExecOpt, IntPtr variantIn, IntPtr variantOut)</description>
<source>Editor or Editor Extension</source>
<description>System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: length
at Microsoft.VisualStudio.Text.Span..ctor(Int32 start, Int32 length)
snapshot, Int32 start, Int32 length)
at Microsoft.Html.Editor.Classification.HtmlClassifier.UpdateCachedClassificationData(SnapshotSpan span)
at Microsoft.Html.Editor.Classification.HtmlClassifier.GetClassificationSpans(SnapshotSpan span)
Feb 05, 2014 01:30 AM|Starain chen - MSFT|LINK
For that scenario, you could submit this feedback to Microsoft Connect feedback portal:
http://connect.microsoft.com , Microsoft engineers will evaluate them seriously. Thanks for your understanding. After you submit the feedback, you can post the link here which will be beneficial for other members with
the similar issue.
Mar 27, 2014 12:34 AM|Kolchy|LINK
I am experiencing the same problems (Win 8.1, VS 2013 with Update 1). Tried both with and without Admin rights. Did someone end up logging a bug?
Apr 09, 2014 01:53 PM|ben-day|LINK
I have this same problem in VS2013.2 RC. When Visual Studio 2013 crashes, if you debug it, the exception message says
** START OF EXCEPTION **
System.InvalidOperationException was unhandled
Message: An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.VisualStudio.Platform.VSEditor.dll
Additional information: Master edit already in progress
** END OF EXCEPTION **
My theory is that this is some kind of weird non-displayable character problem in the file. Let's say the issue is happening in a file called problem.cshtml. Here is my workaround:
1. Take the contents of the problem.cshtml and copy it out to another file as a backup
2. In Visual Studio, select all the contents from problem.cshtml and type CTRL-X to cut the contents to the clipboard. The file should now be empty.
3. Click Save
4. Type CTRL-K, CTRL-D. It should succeed.
5. Paste the contents of the file from the clipboard to problem.cshtml by typing CTRL-V
6. Click Save
7. Type CTRL-K, CTRL-D. It should succeed.
I hope this helps.
Jun 04, 2014 05:45 PM|etmargallo|LINK
+1 to ben-day's temporary solution. This seems to work for me too.
The crash on code format did not happen on all cshtml pages, just certain ones. Strange.
Jul 21, 2014 12:28 PM|markadrake|LINK
First - +1 on this issue - every cshtml file in my project has the potential to crash VS2013 when I do something that triggers the program to apply formatting.
However, I can't say Ben's trick worked for me. I removed the contents of the file, saved, and of course formatting the blank file did not crash. I can't confirm whether the format function even runs on a blank file though.
When I go to paste the code back into the file, I believe this triggers a call to format the code doesn't it? VS crashes on paste.
Mar 25, 2015 10:37 AM|JCarling|LINK
I've got the same problem too. Has anyone come up with a real solution?
It doesn't happen on every file being edited.
Jul 29, 2015 01:09 PM|ckelley|LINK
I'm having this same problem with VS.NET 2013 Update 4 on Windows 7 Professional x64.