microsoft / VS-Macros

An extension for Visual Studio 2013+ that enables the use of macros in the IDE. The extension can record most of the features in Visual Studio including text editing operations.
Other
131 stars 41 forks source link

VS crash (VS15.9.4) #63

Open tamlin-mike opened 5 years ago

tamlin-mike commented 5 years ago

I'm not sure if this can be solved in VS-Macros, or if VS (or even .NET/CLR) itself is broken beyond repair, but here goes...

I had mapped playback to a repeatable key combination, and held down that playback shortcut. After less than ten repetitions the editor messed up, editing in a location it should not, and then froze. Trying to get it to wake up I got a complete VS crash (including the inevitable and obvious Data Loss, so this should be easy to escalate if required), where an !analyze -v of the crashdump revealed the following:

STACK_TEXT:  
2d9af4dc 689f857e System_Core_ni!System.IO.Pipes.PipeStream.CheckReadOperations+0x2cc326
2d9af4e8 6872af9a System_Core_ni!System.IO.Pipes.PipeStream.Read+0x8e
2d9af504 6a7eb942 mscorlib_ni!System.IO.BinaryReader.ReadBytes+0x42
2d9af51c 6a7e07c8 mscorlib_ni!System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Read+0x18
2d9af530 6a7e0773 mscorlib_ni!System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadSerializationHeaderRecord+0x23
2d9af540 6a7e0307 mscorlib_ni!System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run+0x27
2d9af570 6a7e020f mscorlib_ni!System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize+0x7f
2d9af598 6a7dffdb mscorlib_ni!System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize+0xbb
2d9af5c0 06ca71e7 UNKNOWN!VSMacros.Pipes.Server.WaitForMessage+0x87
2d9af5e8 6a7c60fd mscorlib_ni!System.Threading.ThreadHelper.ThreadStart_Context+0x9d
2d9af5f4 6a7f29a5 mscorlib_ni!System.Threading.ExecutionContext.RunInternal+0xe5
2d9af660 6a7f28b6 mscorlib_ni!System.Threading.ExecutionContext.Run+0x16
2d9af674 6a7f2871 mscorlib_ni!System.Threading.ExecutionContext.Run+0x41
2d9af68c 6a7c6058 mscorlib_ni!System.Threading.ThreadHelper.ThreadStart+0x44

(I think this might have been the reason I stopped using this extension a few years back)

Edit: Upon running VS under another VS as debugger (as the crash is 100% repeatable within mere seconds), it told me a bit more:

System.InvalidOperationException
  HResult=0x80131509
  Message=Pipe hasn't been connected yet.
  Source=System.Core
  StackTrace:
   at System.IO.Pipes.PipeStream.CheckReadOperations()
   at System.IO.Pipes.PipeStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BinaryReader.ReadBytes(Int32 count) in f:\dd\ndp\clr\src\BCL\system\io\binaryreader.cs:line 536
   at System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Read(__BinaryParser input) in f:\dd\ndp\clr\src\BCL\system\runtime\serialization\formatters\binary\binarycommonclasses.cs:line 471
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadSerializationHeaderRecord() in f:\dd\ndp\clr\src\BCL\system\runtime\serialization\formatters\binary\binaryparser.cs:line 386
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() in f:\dd\ndp\clr\src\BCL\system\runtime\serialization\formatters\binary\binaryparser.cs:line 111
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) in f:\dd\ndp\clr\src\BCL\system\runtime\serialization\formatters\binary\binaryobjectreader.cs:line 172
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) in f:\dd\ndp\clr\src\BCL\system\runtime\serialization\formatters\binary\binaryformatter.cs:line 197
   at VSMacros.Pipes.Server.WaitForMessage()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state) in f:\dd\ndp\clr\src\BCL\system\threading\thread.cs:line 68
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs:line 954
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs:line 901
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs:line 890
   at System.Threading.ThreadHelper.ThreadStart() in f:\dd\ndp\clr\src\BCL\system\threading\thread.cs:line 105

++luck;