.net Visual Studio DebuggerVisualizer中的StackOverflowException

.net Visual Studio DebuggerVisualizer中的StackOverflowException,.net,visual-studio-2012,stack-overflow,debuggervisualizer,.net,Visual Studio 2012,Stack Overflow,Debuggervisualizer,我正在开发VisualStudio调试器可视化工具。它工作得很好,但后来(出乎意料地)坏了。我不明白为什么会这样,因为我没有改变任何重要的事情 因此,现在我得到在mscorlib.dll中发生了类型为'System.StackOverflowException'的未处理异常 这是我的密码: var visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof(DebuggerSide)); visualizerH

我正在开发VisualStudio调试器可视化工具。它工作得很好,但后来(出乎意料地)坏了。我不明白为什么会这样,因为我没有改变任何重要的事情

因此,现在我得到
在mscorlib.dll中发生了类型为'System.StackOverflowException'的未处理异常

这是我的密码:

var visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof(DebuggerSide));
visualizerHost.ShowVisualizer();
下面是调用
visualizerHost.ShowVisualizer()后的堆栈跟踪:

System.RuntimeTypeHandle.GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool loadTypeFromPartialName) + 0x99 bytes   
System.RuntimeTypeHandle.GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark, bool loadTypeFromPartialName) + 0x25 bytes  
System.Runtime.Remoting.RemotingServices.LoadClrTypeWithPartialBindFallback(string typeName, bool partialFallback) + 0x3b bytes 
System.Runtime.Remoting.RemotingServices.InternalGetTypeFromQualifiedTypeName(string qualifiedTypeName, bool partialFallback) + 0x4c bytes  
System.Runtime.Remoting.RemotingServices.GetType(object tp) + 0xce bytes    
System.Runtime.Serialization.SerializationInfo.AddValue(string name, object value) + 0x1d bytes 
System.Runtime.Remoting.Messaging.LogicalCallContext.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) + 0x145 bytes    
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(object obj, System.Runtime.Serialization.ISurrogateSelector surrogateSelector, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.Formatters.Binary.SerObjectInfoInit serObjectInfoInit, System.Runtime.Serialization.IFormatterConverter converter, System.Runtime.Serialization.Formatters.Binary.ObjectWriter objectWriter, System.Runtime.Serialization.SerializationBinder binder) + 0x31b bytes 
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(object obj, System.Runtime.Serialization.ISurrogateSelector surrogateSelector, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.Formatters.Binary.SerObjectInfoInit serObjectInfoInit, System.Runtime.Serialization.IFormatterConverter converter, System.Runtime.Serialization.Formatters.Binary.ObjectWriter objectWriter, System.Runtime.Serialization.SerializationBinder binder) + 0x10e bytes 
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(object graph, System.Runtime.Remoting.Messaging.Header[] inHeaders, System.Runtime.Serialization.Formatters.Binary.__BinaryWriter serWriter, bool fCheck) + 0x32e bytes   
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(System.IO.Stream serializationStream, object graph, System.Runtime.Remoting.Messaging.Header[] headers, bool fCheck) + 0x142 bytes 
System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.SmuggledMethodCallMessage(System.Runtime.Remoting.Messaging.IMethodCallMessage mcm) + 0x460 bytes   
System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg = {System.Runtime.Remoting.Messaging.Message}) + 0x11d bytes   
System.Runtime.Remoting.Proxies.RemotingProxy.CallProcessMessage(System.Runtime.Remoting.Messaging.IMessageSink ms, System.Runtime.Remoting.Messaging.IMessage reqMsg, System.Runtime.Remoting.Contexts.ArrayWithSize proxySinks, System.Threading.Thread currentThread, System.Runtime.Remoting.Contexts.Context currentContext, bool bSkippingContextChain) + 0x8c bytes  
System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(System.Runtime.Remoting.Messaging.IMethodCallMessage reqMcmMsg, bool useDispatchMessage, int callType) + 0x22c bytes   
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(ref System.Runtime.Remoting.Proxies.MessageData msgData, int type) + 0x1f4 bytes    
Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.DelegatedHost.HostResolver.ResolveRemoteAssembly(string fullAssemblyName = "nunit.core, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77") + 0x99 bytes 
Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.DelegatedHost.HostResolver.ResolveName(string fullAssemblyName = "nunit.core, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77", bool noVersion = false, bool cacheOnly = false) + 0x94 bytes   
Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.AbstractAssemblyResolver.ResolveName(string fullAssemblyName = "nunit.core, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77", bool cacheOnly = false) + 0x53 bytes 
Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.AbstractAssemblyResolver.ResolveName(string fullAssemblyname = "nunit.core, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77") + 0x6e bytes 
Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.AbstractAssemblyResolver.ResolveHandler(object source = {System.AppDomain}, System.ResolveEventArgs resolveArgs = {System.ResolveEventArgs}) + 0x58 bytes    
System.AppDomain.OnAssemblyResolveEvent(System.Reflection.RuntimeAssembly assembly, string assemblyFullName) + 0xbc bytes   
[Native to Managed Transition]  
[Managed to Native Transition]  
System.RuntimeTypeHandle.GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool loadTypeFromPartialName) + 0x99 bytes   
System.RuntimeTypeHandle.GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark, bool loadTypeFromPartialName) + 0x25 bytes  
System.Runtime.Remoting.RemotingServices.LoadClrTypeWithPartialBindFallback(string typeName, bool partialFallback) + 0x3b bytes 
System.Runtime.Remoting.RemotingServices.InternalGetTypeFromQualifiedTypeName(string qualifiedTypeName, bool partialFallback) + 0x4c bytes  
System.Runtime.Remoting.RemotingServices.GetType(object tp) + 0xce bytes    
System.Runtime.Serialization.SerializationInfo.AddValue(string name, object value) + 0x1d bytes 
System.Runtime.Remoting.Messaging.LogicalCallContext.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) + 0x145 bytes    
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(object obj, System.Runtime.Serialization.ISurrogateSelector surrogateSelector, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.Formatters.Binary.SerObjectInfoInit serObjectInfoInit, System.Runtime.Serialization.IFormatterConverter converter, System.Runtime.Serialization.Formatters.Binary.ObjectWriter objectWriter, System.Runtime.Serialization.SerializationBinder binder) + 0x31b bytes 
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(object obj, System.Runtime.Serialization.ISurrogateSelector surrogateSelector, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.Formatters.Binary.SerObjectInfoInit serObjectInfoInit, System.Runtime.Serialization.IFormatterConverter converter, System.Runtime.Serialization.Formatters.Binary.ObjectWriter objectWriter, System.Runtime.Serialization.SerializationBinder binder) + 0x10e bytes 
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(object graph, System.Runtime.Remoting.Messaging.Header[] inHeaders, System.Runtime.Serialization.Formatters.Binary.__BinaryWriter serWriter, bool fCheck) + 0x32e bytes   
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(System.IO.Stream serializationStream, object graph, System.Runtime.Remoting.Messaging.Header[] headers, bool fCheck) + 0x142 bytes 
System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.SmuggledMethodCallMessage(System.Runtime.Remoting.Messaging.IMethodCallMessage mcm) + 0x460 bytes   
System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg = {System.Runtime.Remoting.Messaging.Message}) + 0x11d bytes   
System.Runtime.Remoting.Proxies.RemotingProxy.CallProcessMessage(System.Runtime.Remoting.Messaging.IMessageSink ms, System.Runtime.Remoting.Messaging.IMessage reqMsg, System.Runtime.Remoting.Contexts.ArrayWithSize proxySinks, System.Threading.Thread currentThread, System.Runtime.Remoting.Contexts.Context currentContext, bool bSkippingContextChain) + 0x8c bytes  
System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(System.Runtime.Remoting.Messaging.IMethodCallMessage reqMcmMsg, bool useDispatchMessage, int callType) + 0x22c bytes   
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(ref System.Runtime.Remoting.Proxies.MessageData msgData, int type) + 0x1f4 bytes    
Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.DelegatedHost.CreateViewer(System.IntPtr hwnd = 65552, Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.HostServicesHelper hsh = {System.Runtime.Remoting.Proxies.__TransparentProxy}, Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.SafeProxyWrapper proxy = {System.Runtime.Remoting.Proxies.__TransparentProxy}) + 0x198 bytes 
[Appdomain Transition]  
Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.IManagedViewerHost.CreateViewer(System.IntPtr hwnd = 65552, object hostServicesParam = null, Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.IPropertyProxyEESide proxy = {Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost.EEProxyImpl}) + 0x4df bytes    
Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost.EEProxyImpl.ShowVisualizer(System.IntPtr parentWindow = 65552) + 0x6c bytes    
Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost.ShowVisualizer(System.IntPtr parentHandle = 65552) + 0x77 bytes    
Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost.ShowVisualizer() + 0x41 bytes  
[Native to Managed Transition]
之后的块不断重复,导致
StackOverflowException


有人知道这个问题吗?

您以某种方式创建了一个递归循环,但我在您发布的代码中看不到它

注意,递归循环在mscorlib.dllSo中,您找到解决方案了吗?没有,我找不到解决方案