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?

moribvndvs
  • 42,191
  • 11
  • 135
  • 149
Rocky Singh
  • 15,128
  • 29
  • 99
  • 146
  • where on the application this error occurs? – BizApps Dec 14 '11 at 05:22
  • Why do you said you are not able to capture this error at Application_OnError ? – Steve B Dec 14 '11 at 05:22
  • I am logging errors in my Application_OnError and nothing is coming there in HttpContext.Current.Server.GetLastError() – Rocky Singh Dec 14 '11 at 05:24
  • StackOverflowExceptions are treated special by the CLR so it wouldn't surprise me if this isn't getting caught in Application_OnError. Without knowing more about your application though it will be impossible to help you determine the cause. Perhaps a recursive method? – M.Babcock Dec 14 '11 at 05:24
  • @BizApps that's what I am not able to track. I just have the message (which I have written in the question) logged in Event Viewer. – Rocky Singh Dec 14 '11 at 05:25
  • checkout: http://stackoverflow.com/questions/7463377/log-a-stackoverflowexception-in-net/7682663#7682663 – bryanmac Dec 14 '11 at 05:26
  • Well, when I first saw this question, I thought you were blaming this website... – Biosci3c Dec 14 '11 at 05:37
  • check out http://stackoverflow.com/questions/3044752/how-do-i-crash-the-app-pool/3045137#3045137 – Aristos Dec 14 '11 at 05:50
  • and also check http://stackoverflow.com/questions/6285979/iis-crashes-and-restarts-without-dropping-a-mini-dump/6286218#6286218 – Aristos Dec 14 '11 at 05:51
  • The above links lead me to this link http://blogs.msdn.com/b/tess/archive/2008/02/04/net-debugging-demos-information-and-setup-instructions.aspx I am running IIS7.5 and Windows 7. The above link demans tinyget.exe. Can you help me finding tinyget.exe? – Rocky Singh Dec 14 '11 at 06:44

1 Answers1

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);
Cj S.
  • 1,173
  • 8
  • 13