Bob
Bob

Reputation: 686

Strange Visual Studio 2012 Exception: Unable to use Text Editor

Exceptions Thrown:

Attempted TextBuffer edit operation while another edit is in progress

Index was outside the bounds of the array

I currently have open a .ascx file and I was in the process of editing some html code that contained Knockout.js data-bind's. When editing the text in the file I was greeted by the above error and I am unable to backspace, delete, or edit the code. The Visual Studio text editor shifted all the colors as if it had no idea what code was on the screen.

Code in question:

<div class="paging item-pad-top clearfix">
   <ul>
      <li><a href="#" data-bind="click: grouped.moveFirst">«</a></li>           
          <!-- ko foreach: new Array(grouped.pageCount()) -->
              <<li>
                   <a data-bind='text: $index() + 1'/>
              </li>
          <!-- /ko -->
      <li><a href="#" data-bind="click: grouped.moveLast">»</a></li>   
   </ul>
</div>

Note that the second li has TWO < characters. I am unable to remove this second character.

I am running as administrator. I cannot edit any other code on this page.

Upvotes: 9

Views: 5365

Answers (1)

Nikhil Girraj
Nikhil Girraj

Reputation: 1143

This error sometimes comes after the ActivityLog.xml file for the particular file you are editing gets corrupted. I have encountered the error a few times and from what it seems, ActivityLog.xml handles all the text edit operations for the associated file.

Closing and opening the file again should resolve the issue as it always did for mine.

Upvotes: 14

Related Questions