1

Re: ViEmu Exception

I was tweeting about this to you earlier today.

I'm getting an error in VS2010 that looks like this:

http://imgur.com/qXOjc.png

I can consistently pop the error up with the following snippet of code:

<tr></tr>

To recreate the bug:
1) Place the carrot on the < of the </tr>
2) In visual mode, hit v$x
3) Visual Studio Error comes up

I was able to recreate this bug in a .config and a .aspx file. The error does not occur in a .cs file. I'm guessing this has something to do with syntax and matching.

I turned on Visual Studio Logging using the /log parameter. I can send you the entire ActivityLog if needed, but the only error was from ViEmu. Here's the entry:

<entry>
    <record>291</record>
    <time>2010/06/24 22:40:26.323</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.&#x000D;&#x000A;Parameter name: offset&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.VirtualSnapshotPoint..ctor(ITextSnapshotLine line, Int32 offset)&#x000D;&#x000A;   at HubTen.Conversions.VirtualSnapshotPointFromPos(ITextSnapshot qSnapshot, UInt32 line, UInt32 col)&#x000D;&#x000A;   at HubTen.BufAccess.CalcVisualPosition(VI_TPos physical_pos)&#x000D;&#x000A;   at nglib.StoreVirtualMotion&lt;class nglib::wide_char_t,class nglib::RichReadTextView&lt;class HubTen::TenCoreRTV&gt;,struct GlobalFullPos,class nglib::wide_char_t&gt;(RichReadTextView&lt;HubTen::TenCoreRTV&gt;* rtv, ViFullCommand&lt;nglib::wide_char_t&gt;* pfc, ViMotionResult&lt;nglib::RichReadTextView&lt;HubTen::TenCoreRTV&gt;\,GlobalFullPos\,nglib::wide_char_t&gt;* pMot)&#x000D;&#x000A;   at nglib.ViCore&lt;TenCoreControl&gt;.ExecCommand&lt;class TenOpControl&lt;class nglib::RichReadTextView&lt;class HubTen::TenCoreRTV&gt;,class HubTen::TenCaretOps&lt;class nglib::ViCore&lt;class TenCoreControl&gt;,struct nglib::key_dotnet&gt; &gt;,class HubTen::TenCaretOps&lt;class nglib::ViCore&lt;class TenCoreControl&gt;,struct nglib::key_dotnet&gt; &gt;(ViCore&lt;TenCoreControl&gt;* , ViFullCommand&lt;nglib::wide_char_t&gt;* fc, TenOpControl&lt;nglib::RichReadTextView&lt;HubTen::TenCoreRTV&gt;\,HubTen::TenCaretOps&lt;nglib::ViCore&lt;TenCoreControl&gt;\,nglib::key_dotnet&gt; &gt;* OpControl, TenCaretOps&lt;nglib::ViCore&lt;TenCoreControl&gt;\,nglib::key_dotnet&gt;* CaretOps, Boolean doing_dot, keyqueue_t* pQueue)&#x000D;&#x000A;   at nglib.ViCore&lt;TenCoreControl&gt;.CoreProcessKey&lt;class TenOpControl&lt;class nglib::RichReadTextView&lt;class HubTen::TenCoreRTV&gt;,class HubTen::TenCaretOps&lt;class nglib::ViCore&lt;class TenCoreControl&gt;,struct nglib::key_dotnet&gt; &gt;,class HubTen::TenCaretOps&lt;class nglib::ViCore&lt;class TenCoreControl&gt;,struct nglib::key_dotnet&gt; &gt;(ViCore&lt;TenCoreControl&gt;* , key_dotnet k, Boolean interactive, TenOpControl&lt;nglib::RichReadTextView&lt;HubTen::TenCoreRTV&gt;\,HubTen::TenCaretOps&lt;nglib::ViCore&lt;TenCoreControl&gt;\,nglib::key_dotnet&gt; &gt;* OpControl, TenCaretOps&lt;nglib::ViCore&lt;TenCoreControl&gt;\,nglib::key_dotnet&gt;* CaretOps, keyqueue_t* pQueue)&#x000D;&#x000A;   at nglib.ViCore&lt;TenCoreControl&gt;.ProcessKeyQueue&lt;class TenOpControl&lt;class nglib::RichReadTextView&lt;class HubTen::TenCoreRTV&gt;,class HubTen::TenCaretOps&lt;class nglib::ViCore&lt;class TenCoreControl&gt;,struct nglib::key_dotnet&gt; &gt;,class HubTen::TenCaretOps&lt;class nglib::ViCore&lt;class TenCoreControl&gt;,struct nglib::key_dotnet&gt; &gt;(ViCore&lt;TenCoreControl&gt;* , TenOpControl&lt;nglib::RichReadTextView&lt;HubTen::TenCoreRTV&gt;\,HubTen::TenCaretOps&lt;nglib::ViCore&lt;TenCoreControl&gt;\,nglib::key_dotnet&gt; &gt;* OpControl, TenCaretOps&lt;nglib::ViCore&lt;TenCoreControl&gt;\,nglib::key_dotnet&gt;* CaretOps, Boolean force)&#x000D;&#x000A;   at nglib.ViCore&lt;TenCoreControl&gt;.ProcessKey&lt;class TenOpControl&lt;class nglib::RichReadTextView&lt;class HubTen::TenCoreRTV&gt;,class HubTen::TenCaretOps&lt;class nglib::ViCore&lt;class TenCoreControl&gt;,struct nglib::key_dotnet&gt; &gt;,class HubTen::TenCaretOps&lt;class nglib::ViCore&lt;class TenCoreControl&gt;,struct nglib::key_dotnet&gt; &gt;(ViCore&lt;TenCoreControl&gt;* , key_dotnet k, TenOpControl&lt;nglib::RichReadTextView&lt;HubTen::TenCoreRTV&gt;\,HubTen::TenCaretOps&lt;nglib::ViCore&lt;TenCoreControl&gt;\,nglib::key_dotnet&gt; &gt;* OpControl, TenCaretOps&lt;nglib::ViCore&lt;TenCoreControl&gt;\,nglib::key_dotnet&gt;* CaretOps)&#x000D;&#x000A;   at HubTen.Interceptor.ProcessKey(key_dotnet key)&#x000D;&#x000A;   at HubTen.Interceptor.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.CommandFilterWrapper.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.CommandChainNode.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.CommandFilterWrapper.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.Exec(Guid&amp; pguidCmdGroup, UInt32 nCmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.SendCommand(Guid cmdGroup, UInt32 cmdID, Object inParam)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.VsKeyboardFilter.TextInput(TextCompositionEventArgs args)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.&lt;DispatchTextInputEvents&gt;b__0(KeyProcessor p, TextCompositionEventArgs args)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Editor.Implementation.KeyProcessorDispatcher.&lt;&gt;c__DisplayClass1e`1.&lt;Dispatch&gt;b__1a()&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)</description>
  </entry>

2

Re: ViEmu Exception

Thanks so much Dusting. I'm hoping this detailed report will allow us to easily reproduce it and let us find a fix. Regards, -- Jon