Application crashing due to stackoverflow

4

This error is killing me so much. I am not able to capture this error at Application_OnError. The only message I am able to get is Event Viewer log.

Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to stack overflow.



Faulting application w3wp.exe, version 7.0.6001.18000, time stamp 0x47919413, faulting module nlssorting.dll, version 4.0.30319.235, time stamp 0x4da3fc88, exception code 0xc00000fd, fault offset 0x000020d4, process id 0x%9, application start time 0x%10.

I have a very large application and with the above error I am not able to judge where is the exact cause of the stackoverflow. Can you help me fixing this?

c#
asp.net
debugging
iis
iis-7
asked on Stack Overflow Dec 14, 2011 by Rocky Singh • edited Dec 14, 2011 by moribvndvs

1 Answer

2

You may get more help in Application_End. From here, you can capture the shutdown stack using something like this...

HttpRuntime runtime = (HttpRuntime)typeof(System.Web.HttpRuntime).InvokeMember("_theRuntime", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.GetField, null, null, null);

(string)runtime.GetType().InvokeMember("_shutDownStack", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, null, runtime, null);

(string)runtime.GetType().InvokeMember("_shutDownMessage", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, null, runtime, null);
answered on Stack Overflow Dec 14, 2011 by Cj S.

User contributions licensed under CC BY-SA 3.0