stack-trace

Which order does getTrace return calls?

Probably a trivial question, but in which order does Exception::getTrace return calls? Most recent first or last? I'd like to know before I implement my error handler. BenTheDesigner ...

Any reason not to always log stack traces?

Encountered a frustrating problem in our application today which came down to an ArrayIndexOutOfBounds exception being thrown. The exception's type was just about all that was logged which is fairly useless (but, oh dear legacy app, we still love you, mostly). I've redeployed the application with a change which logs the stack trace on ...

Any porting available of backtrace for uclibc?

We are running the uclibc linux on ARM 9. The problem is uclibc doesn't support backtrace. When a core dump happens, I cannot grab the call stack. Does anyone have a good solution for that? For example, an existing porting of backtrace for uclibc, or any good method to grab the call stack when a core dump happens (uclibc+ARM+Linux)? ...

How to print stack trace of StackOverflowException

I am developing a .Net 2.0 application in which a StackOverflowException occurs. Is there a way to print/log the stack trace before/during the application aborts? This is a long running server-side process which would be hard to execute under a debugger. I know that StackOverflowException can not be caught. ...

Add stacktrace to every log in log4net

Hi all... I'm using Log4Net to log a multilayered enterprise application. I know that when i log with exception Log4Net automatically exposes the exception StackTarce, but i want to log the stacktrace for every log even if those are not exception throws. Why i need that?... Simply, i want to know the call origin of the log (drilldown th...

Is the valid state domain of a program a regular language?

If you look at the call stack of a program and treat each return pointer as a token, what kind of automata is needed to build a recognizer for the valid states of the program? As a corollary, what kind of automata is needed to build a recognizer for a specific bug state? (Note: I'm only looking at the info that could be had from this f...

How to use traceit to report function input variables in stack trace

Hi, I've been using the following code to trace the execution of my programs: import sys import linecache import random def traceit(frame, event, arg): if event == "line": lineno = frame.f_lineno filename = frame.f_globals["__file__"] if filename == "<stdin>": filename = "traceit.py" if ...

Help with Java thread dump of partially hanged j2ee server.

Hi. Our J2ee server (which will remain nameless for embarrassment reasons) slows down drastically from time to time. I have managed to create a thread dump. And trying to analyze it. One of the things that I don't understand is some waiting on locks without finding the locking thread. Here is part of the stack trace of such thread: wait...

How can I get the Python module and line number that called my C++ function via Boost::Python?

I have a C++ function that is being called from many Python functions via Boost::Python. When the C++ function detects bad arguments I want to write a log message and continue processing. In that log message I would like to note the Python module and line number that called into C++. How can I do this? I am able to throw an exception fr...

C++ memory leak detecting method

I'm working on a project using many external library on windows. I got problem with memory leak: i detected many memory leaks by overriding operator new/new[] and delete/delete[]. The problem is i know how many memory blocks are leaked, but don't know where to find them, in overrided functions, i could log size and position of allocated ...

IIS not giving line numbers in stack trace even though pdb present

Web config has debug=true and the project is a debug build and the pdb files are present in the bin directory, but I do not get line numbers in my stacktrace when an exception is thrown. Works fine with local IIS/Cassini but not on our test IIS servers. Is there some obvious setting that I might be missing? ...

Symbolizing plugins in Instruments' stack traces

Instruments is able to properly symbolize my app's main bundle (as well as frameworks and libraries) in the stack trace of the extended detail view. However, symbols aren't resolved for plugins loaded during execution. Setting the build directory where the dSym files for the main and plugin bundles are located (as well as the app itself...

C#: how to hide a method from the stack trace?

I have a dead simple one-liner method that I don't want to see in the stack trace: is that possible? maybe mark it with an attribute? Just to clarify, I'm not trying to print the trace, or rethrow, or have auto step-through in the debugger. I'd like the method to not show up in the trace in the first place, because the trace is then han...

Can I get the stack traces of all threads in my c# app?

I'm debugging an apparent concurrency issue in a largish app that I hack on at work. The bug in question only manifests on certain lower-performance machines after running for many (12+) hours, and I have never reproduced it in the debugger. Because of this, my debugging tools are basically limited to analyzing log files. C# makes it ...

How does this method give me a -61 Error?

This is in an application I am using called Mirth, but it appears to be coming from inside an Apache Commons library from a method that checks if something is indeed Base64 encoded or not. All of the docs say the only return is true or false, so how am I getting -61? -61 org.apache.commons.codec.binary.Base64.isBase64(Base64.java:137) ...

Stack trace with incorrect line number

Why would a stack trace show "line 0", but only for one frame in the stack trace? eg. ... at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at My.LibraryA.Some.Method():line 16 at My.LibraryB.Some.OtherMethod():line 0 at My.LibraryB.S...

Identifying a function call in a python script line in runtime

I have a python script that I run with 'exec'. When a function is called by the script, I would like it to know the line number and offset in line for that call. Here is an example. If my script is: foo1(); foo2(); foo1() foo3() And if I have code that prints (line,offset) in every function, I should get (0,0), (0,8), (0,16), (1,0) ...

How to obtain the native stacktrace from native exceptions caught in managed code

I have some managed code that calls to a method inside some native DLL(i have the appropriate symbol files). Sometimes, that native method throws an exception which I catch in my managed code. However, when i print the stacktrace from my caught exception, I see only managed code (the last frame is the call to the native code .. but it do...

getting java.lang.OutOfMemoryError exception while running a Midlet (using netbeans)

I am writing a Midlet(using Netbeans) which reads a file containing exactly 2400 lines (each line being 32 characters long) and (extract a part of each line) puts them in an array. I am doing the same for 11 such files( all files have exactly 2400 lines).The Midlet runs fine for reading 6 files and putting them in 6 arrays. However, the ...

ASP.NET exception gives irrelevant stack trace on YSOD, very challenging!

Here is the YSOD: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exce...