windbg.info
Home Search
 You are here: arrow Home Forum

Search Our Site

www.windbg.info
Welcome, Guest
Please Login or Register.    Lost Password?
StackOverFlowException in .Net
(1 viewing) 1 Guest
Go to bottom
TOPIC: StackOverFlowException in .Net
#142
Daniele Foschi (User)
Posts: 1
User Offline

StackOverFlowException in .Net 07 Dec 2011 - 13:57
Hi,
I've a question about finding StackOverFlowException in .net programs.
I have a simple program test that generates a StackOverFlowException when I click a button:

private void button1_Click(object sender, EventArgs e)
{
MyMethod();
}

private void MyMethod()
{
MyMethod();
}

Windbg+sos loads symbols correctly, but with analyze command I've not find references to MyMethod that caused StackOverflow; instead if I build in debug mode I can see full stack with recursive call of MyMethod.
What can I do to see full stack in release mode?
Can anyone help me?
Thanks!


Below WinDBG output in release and debug mode (extract from !analyze -v command)

*** WinDBG RELEASE MODE: ***

[...]
MANAGED_STACK:
(TransitionMU)
0019F158 664D8CEE System_Windows_Forms_ni!System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32)+0x24e
0019F1F4 664D8957 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)+0x177
0019F248 664D87A1 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)+0x61
0019F278 66495911 System_Windows_Forms_ni!System.Windows.Forms.Application.Run(System.Windows.Forms.Form)+0x31
0019F28C 0061009A ProvaCrash!ProvaCrash.Program.Main()+0x2a
(TransitionUM)

[...]
MANAGED_OBJECT_NAME: System.StackOverflowException
[...]

STACK_TEXT:
WARNING: Frame IP not in any known module. Following frames may be wrong.
0019ee20 6648f55a 018ed980 019036dc 0019ee4c 0x40c0a2
0019ee30 66a26f64 00000619 000000e4 00100000 System_Windows_Forms_ni+0x1bf55a
0019ee4c 669f7773 018ed980 00000005 00050033 System_Windows_Forms_ni+0x756f64
0019eed0 66d2a202 00000001 00100000 e9f17a94 System_Windows_Forms_ni+0x727773
0019ef30 66d289d1 018ed980 00000000 00000000 System_Windows_Forms_ni+0xa5a202
0019ef74 664c25b0 0019efa8 0019ef88 664c86a0 System_Windows_Forms_ni+0xa589d1
0019ef80 664c86a0 0019ef9c 664c8621 00000000 System_Windows_Forms_ni+0x1f25b0
0019ef88 664c8621 00000000 018eda50 0019efcc System_Windows_Forms_ni+0x1f86a0
0019ef9c 664c84fa 018eda50 00081054 00000202 System_Windows_Forms_ni+0x1f8621
0019f000 76b1c4e7 00081054 00000202 00000000 System_Windows_Forms_ni+0x1f84fa
0019f02c 76b1c5e7 005d0cb2 00081054 00000202 user32!InternalCallWinProc+0x23
0019f0a4 76b1cc19 00273244 005d0cb2 00081054 user32!UserCallWinProcCheckWow+0x14b
0019f104 76b1cc70 005d0cb2 00000000 0019f130 user32!DispatchMessageWorker+0x35e
0019f114 012b110e 0019f1a0 e9f17a94 00000000 user32!DispatchMessageW+0xf
0019f130 664d8cee 018f4dac 00000001 018ea380 0x12b110e
[.....]
0019fe34 76f337c8 6fd54ddb 7ffd5000 00000000 ntdll!__RtlUserThreadStart+0x70
0019fe4c 00000000 6fd54ddb 7ffd5000 00000000 ntdll!_RtlUserThreadStart+0x1b


*** WinDBG DEBUG MODE: ***


[...a lot of rows of MyMethod...]
0030ef70 001f0506 ProvaCrash.Form1.MyMethod()
0030ef7c 001f04cb ProvaCrash.Form1.button1_Click(System.Object, System.EventArgs)
0030ef90 66494170 System.Windows.Forms.Control.OnClick(System.EventArgs)
0030efa8 6648f55a System.Windows.Forms.Button.OnClick(System.EventArgs)
0030efb8 66a26f64 System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
0030efd4 669f7773 System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
0030f060 66d2a202 System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
0030f064 66d289d1 [InlinedCallFrame: 0030f064]
0030f0fc 664c25b0 System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
0030f108 664c86a0 System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
0030f110 664c8621 System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
0030f124 664c84fa System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
0030f2c8 008709e4 [NDirectMethodFrameStandalone: 0030f2c8] System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
0030f2d8 664d8cee System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32)
0030f374 664d8957 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
0030f3c8 664d87a1 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
0030f3f8 66495911 System.Windows.Forms.Application.Run(System.Windows.Forms.Form)
0030f40c 001f00ae ProvaCrash.Program.Main()
0030f638 69d51b4c [GCFrame: 0030f638]
 
  Logged IP
  The administrator has disabled public write access.
Go to top
  up top of page up  
 

Copyright © 2024 WinDbg.info. All Rights Reserved.
Page generated in 0.0004 seconds.