stack-trace

Why do I get no line numbers from a stack trace created from Exceptions?

Okay; assuming this code running in debug mode - static StackFrame GetTopFrameWithLineNumber(Exception e) { StackTrace trace = new StackTrace(e); foreach (StackFrame frame in trace.GetFrames()) { if (frame.GetFileLineNumber() != 0) { return frame; } } return null; } I'm ALWAYS re...

Limited stack trace in Process Explorer

I have a process running under Windows Server 2003 SP2. When I want to check stack trace of one of its threads it is always limited to 9 entries. Those entries are resolved correctly (I have PDBs in place) but list is just cut in middle. Do you know of any limitation in Process Explorer? ...

How to display stack trace on a caught exception?

I have a generic function that prints exceptions (using log4j): private void _showErrorMessage(Exception e) { log.error(e.getClass() + ": " + e.getMessage() + ": " + e.getCause() + "\n" + e.getStackTrace().toString()); } Instead of seeing the stack trace I'm seeing: [Ljava.lang.StackTraceElement;@49af7e68 How can I view the s...

How do I hide stack traces in the browser (using Jetty)?

I'm using Jetty as my servlet container. If an exception is thrown in one of my servlets the browser will display an HTTP ERROR 500 with the exception message and a stack trace. For security reasons I need to hide the stack trace. Is there a way to configure this generally? Or do I need to trap all Throwables in my Servlet? Thanks ...

Is it possible to get the stacktrace of an error in the error_logger handler?

Hi, im currently writing an error_logger handler and would like to get the stacktrace where the error happend (more precisely: at the place, where error_logger:error* was called). But I cannot use the erlang:get_stacktrace() method, since i'm in a different process. Does anyone know a way to get a stacktrace here? Thanks ...

How to print each function call during execution in WinDbg?

I am debugging an application written in VC++. How do i make WinDbg print the function name and all the values of the arguments to the functions during execution of the debuged process? ...

.net Compact Framework callstack - how?

The System.Diagnostics namespace (and GetFrame(int frameNumber) in particular) is not available in the CF. How do I go about getting callstack details when running on CE (6.0 R3) ? Thanks! ...

Haskell equivalent of C's __LINE__

Is there a way to get line-number/traceback information in Haskell? (like C's __LINE__ macro or Python's traceback.extract_stack()) That would be of use for me for writing Haskell program that generates C++ code, which would be notated with comments telling which Haskell line is responsible for which C++ line. Haskell example: LINE "...

Need a way to periodically log the call stack/stack trace for EVERY method/procedure/function called

I'm working on a very large application where periodically I'd like to log the ENTIRE call stack up until the current execution point (not on an exception). The idea here is that I want a map of the exact code path that led me to the point that I am. I have been working with madExcept, tooled around with jclDebug and while I can get so...

Error is not caught by jquery start() function

[Update. I need to be more precise, I see...] See the following example in javascript: <html> <head> <script> window.onerror = function() { alert('error'); // this one works try {i.dont.exist += 0;} catch(e) { // do some stacktrace stuff, this does not trigger alert(e.stack); ...

How to get the stack trace from errors in a FireFox extension?

Is there a convenient way to do this for my extension? I know I can use FireBug to get traces for exceptions which happen in content, but I don't think it works for chrome (does it?). I couldn't get ChromeBug to work when I last tried it. ...

C - how can I invoke buffer overflow [hw problem, not hacking]?

Hi! I got a hw assignment asking me to invoke a function without explicitly calling it, using buffer overflow. The code is basically this: #include <stdio.h> #include <stdlib.h> void g() { printf("now inside g()!\n"); } void f() { printf("now inside f()!\n"); // can only modify this section // cant call g(), maybe...

How can you inspect the stack trace of an exception in Python?

When an exception occurs in Python, can you inspect the stack? Can you determine its depth? I've looked at the traceback module, but I can't figure out how to use it. My goal is to catch any exceptions that occur during the parsing of an eval expression, without catching exceptions thrown by any functions it may have called. Don't be...

JRuby mysterious stack trace

I'm using JRuby 1.4.0 complete jar in one of my projects. I'm executing it from ant via the exec task: java -jar jruby1.4.0.jar script.rb script_params The thing is, on some computers I receive this: [exec] Exception in thread "main" :1: no !/ in spec (IOError) [exec] ...internal jruby stack elided... [exec] from (unknown).(unk...

Locate modules by stack address

I have a Winodws Mobile 6.1 application running on an ARMV4I processor. Given a stack address (from unwinding an exception), I like to determine what module owns that address. Using the ToolHelpAPI, I'm able to determine most modules using the following method: HANDLE snapshot = ::CreateToolhelp32Snapshot( TH32CS_SNAPMODULE | TH32CS_GE...

C# Reflection StackTrace get value

I'm making pretty heavy use of reflection in my current project to greatly simplify communication between my controllers and the wcf services. What I want to do now is to obtain a value from the Session within an object that has no direct access to HttpSessionStateBase (IE: Not a controller). For example, a ViewModel. I could pass it in ...

how to obtain a stack trace when WAMP server crashes ?

Hello, Some times my WAMP server crashes . I get the following error. HTTP has encountered exception and needs to close. Unreferenced Memory. szAppName : httpd.exe szAppVer : 2.2.11.0 szModName : php5ts.dll szModVer : 5.3.0.0 offset : 0000c309 C:\DOCUME~1\blrcom\LOCALS~1\Temp\WERc677.dir00\httpd.exe.mdmp C:\DOCU...

How can I see the stack trace in Octave's debug mode

I have a failure in some inner library function in Octave. I want to debug the calling function, but I don't know how to do it. How can I see the stack trace? How can I move between frames? ...

Getting EXC_BAD_ACCESS without any helpful msg from NSZombieEnabled

Hello guys. I'm a newbie to iphone development and I've been struggling with an EXC_BAD_ACCESS error I got a couple of days ago. I'm basically taking the Stanford iphone class independently and I am trying to pass an array of NSManagedObjects to a TableViewController that's supposed to display them. The application launches in the si...

Stack Trace in error in Webpage in ASP not in my code?

I'm new to web-development in ASP, and I'm experiencing a problem where I try to access a certain page through a link and I get an error, the first part says it's an exception, then tips on debugging and then the stacktrace. What happens is that this code isn't on my application, I've had errors like this before, and the peace of code t...