帮助调试 stackoverflow - 重复堆栈的后续步骤?

发布于 2024-09-26 09:24:22 字数 3241 浏览 8 评论 0原文

各位,

我的 .net 4.0 应用程序出现了堆栈溢出。使用 WinDbg,我发现以下堆栈信息块重复了 110 次(当然使用不同的内存地址),这让我相信这就是溢出的情况。问题是这些看起来都不像我的代码!关于如何进行调试有什么建议吗?

000000000008e630 000007fef22d10b4 [CustomGCFrame: 000000000008e630] 
000000000008e5f8 000007fef22d10b4 [GCFrame: 000000000008e5f8] 
000000000008e588 000007fef22d10b4 [GCFrame: 000000000008e588] 
000000000008e958 000007fef22d10b4 [HelperMethodFrame_PROTECTOBJ: 000000000008e958] System.RuntimeMethodHandle._InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeType)
000000000008eaa0 000007fef138587f System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, Boolean)
000000000008ebe0 000007fef13d000f System.Delegate.DynamicInvokeImpl(System.Object[])
000000000008ec50 000007feeee16127 System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry)
000000000008ec90 000007feeee16004 System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(System.Object)
000000000008ed20 000007fef1393178 System.Threading.ExecutionContext.runTryCode(System.Object)
000000000008f448 000007fef22d10b4 [HelperMethodFrame_PROTECTOBJ: 000000000008f448] System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
000000000008f570 000007fef13817e1 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
000000000008f5d0 000007fef138172b System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
000000000008f620 000007feeee15f31 System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry)
000000000008f680 000007feeee15b97 System.Windows.Forms.Control.InvokeMarshaledCallbacks()
000000000008f700 000007feeedfb7da System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
000000000008f8b0 000007feeee09a0d System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef)
000000000008f990 000007feeedfb34c System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
000000000008fa60 000007feef60ef10 DomainBoundILStubClass.IL_STUB_ReversePInvoke(Int64, Int32, Int64, Int64)
000000000008fd98 000007fef236cae7 [NDirectMethodFrameStandalone: 000000000008fd98] System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
000000000008fd60 000007feeee271a0 DomainBoundILStubClass.IL_STUB_PInvoke(MSG ByRef)
000000000008fe30 000007feeee151d0 System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
0000000000090070 000007feeee149d3 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
00000000000901d0 000007feeee14361 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
0000000000090948 000007fef22d10b4 [DebuggerU2MCatchHandlerFrame: 0000000000090948] 
0000000000090a30 000007fef22d10b4 [CustomGCFrame: 0000000000090a30] 

Folks,

I've got a stack overflow in my .net 4.0 app. using WinDbg I've found the following chunk of stack-info repeated 110 times (with different memory addresses of course), which leads me to believe that this is the case of the overflow. The issue is that none of this seems like my code! Any suggestions on how to proceed with debugging?

000000000008e630 000007fef22d10b4 [CustomGCFrame: 000000000008e630] 
000000000008e5f8 000007fef22d10b4 [GCFrame: 000000000008e5f8] 
000000000008e588 000007fef22d10b4 [GCFrame: 000000000008e588] 
000000000008e958 000007fef22d10b4 [HelperMethodFrame_PROTECTOBJ: 000000000008e958] System.RuntimeMethodHandle._InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeType)
000000000008eaa0 000007fef138587f System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, Boolean)
000000000008ebe0 000007fef13d000f System.Delegate.DynamicInvokeImpl(System.Object[])
000000000008ec50 000007feeee16127 System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry)
000000000008ec90 000007feeee16004 System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(System.Object)
000000000008ed20 000007fef1393178 System.Threading.ExecutionContext.runTryCode(System.Object)
000000000008f448 000007fef22d10b4 [HelperMethodFrame_PROTECTOBJ: 000000000008f448] System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
000000000008f570 000007fef13817e1 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
000000000008f5d0 000007fef138172b System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
000000000008f620 000007feeee15f31 System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry)
000000000008f680 000007feeee15b97 System.Windows.Forms.Control.InvokeMarshaledCallbacks()
000000000008f700 000007feeedfb7da System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
000000000008f8b0 000007feeee09a0d System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef)
000000000008f990 000007feeedfb34c System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
000000000008fa60 000007feef60ef10 DomainBoundILStubClass.IL_STUB_ReversePInvoke(Int64, Int32, Int64, Int64)
000000000008fd98 000007fef236cae7 [NDirectMethodFrameStandalone: 000000000008fd98] System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
000000000008fd60 000007feeee271a0 DomainBoundILStubClass.IL_STUB_PInvoke(MSG ByRef)
000000000008fe30 000007feeee151d0 System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
0000000000090070 000007feeee149d3 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
00000000000901d0 000007feeee14361 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
0000000000090948 000007fef22d10b4 [DebuggerU2MCatchHandlerFrame: 0000000000090948] 
0000000000090a30 000007fef22d10b4 [CustomGCFrame: 0000000000090a30] 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甲如呢乙后呢 2024-10-03 09:24:22

看起来您的应用程序正在递归地重新进入其 UI 消息循环。检查窗口的事件处理程序,例如在处理调整大小事件时调整窗口大小之类的事情。

It looks like your app is recursively reentering its UI message loop. Check your window's event handlers, e.g. for things like resizing the window while processing a Resize event.

荒芜了季节 2024-10-03 09:24:22

我(只是)猜测这是为什么不使用 Application.DoEvents() 的一个很好的例子,但您至少应该知道是什么代码导致了这种情况。

I'm (just) guessing that this is a good example of why not to use Application.DoEvents(), but you should have at least some idea of what code causes this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文