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?

10
  • where on the application this error occurs? Commented Dec 14, 2011 at 5:22
  • Why do you said you are not able to capture this error at Application_OnError ? Commented Dec 14, 2011 at 5:22
  • I am logging errors in my Application_OnError and nothing is coming there in HttpContext.Current.Server.GetLastError() Commented Dec 14, 2011 at 5: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? Commented Dec 14, 2011 at 5: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. Commented Dec 14, 2011 at 5:25

1 Answer 1

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);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.