Questions tagged [stack-trace]

A report of the active stack frames at a certain point in time during the execution of a program.

A stack trace is a report of the active stack frames at a certain point in time during the execution of a program and is often referred to as a stack backtrace.

A stack trace is commonly used during interactive and post-mortem debugging. It typically lists all the functions awaiting return values on the stack at the time of the error. By examining what is on the stack and comparing it to what you expect, you can often determine how the error occurred. By inspecting the function containing the error, you may be able to edit and correct the problem.

A stack trace allows to track the sequence of nested functions called up to the point where the stack trace is generated. In a post-mortem scenario this is up to function where the failure occurred (but not necessarily is caused there). Sibling function calls are not visible in a stack trace.

Before you start

Please browse the list of frequently asked questions to see if your question is similar to one that has already been answered.

The tag should be used to mark questions related to generating, interpreting, debugging, or otherwise understanding stack traces.

2320 questions
26
votes
1 answer

What does $$ and mean in Java stacktrace?

I often get stacktraces like this one (please see the arrow for the confusing line): org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [PRIMARY]; nested exception is…
user1028741
  • 2,745
  • 6
  • 34
  • 68
26
votes
4 answers

Getting stack traces in Perl?

How do I get stack traces in Perl?
Timmy
  • 12,468
  • 20
  • 77
  • 107
26
votes
1 answer

How to reduce stack trace when throwing error (point to call site)

I have a function like this: function foo() { throw new Error('`foo` has been removed in favor of `bar`') } When someone calls foo, I want the stack trace (error output) to point at the call site of foo, not the throw line inside of foo. For…
Jo Liss
  • 30,333
  • 19
  • 121
  • 170
26
votes
5 answers

How do I include a stacktrace in my Django 500.html page?

I'm running Django 1.0 and I'm close to deploying my app. As such, I'll be changing the DEBUG setting to False. With that being said, I'd still like to include the stacktrace on my 500.html page when errors occur. By doing so, users can…
Huuuze
  • 15,528
  • 25
  • 72
  • 91
26
votes
2 answers

Capybara: exception trace in log

While running integration tests in capybara, having app raise an exception (500 error; is rendered in browser) there's no stack trace in test.log file. Here's the only line I see there: Completed 500 Internal Server Error in 25ms Am I missing…
ulmen
  • 322
  • 3
  • 8
25
votes
2 answers

Exception shows developer's path instead of servers

When an exception occurs with any ASP.NET project (possibly any .net app) the stack trace will show the path on the developer's machine, even when in production. How to change it? What's going on under the hood?
user1231231412
  • 1,659
  • 2
  • 26
  • 42
25
votes
8 answers

Check what a running process is doing: print stack trace of an uninstrumented Python program

Is there a way on Linux to check what a running Python daemon process is doing? That is, without instrumenting the code and without terminating it? Preferably I'd like to get the name of the module and the line number in it that is currently…
Björn Lindqvist
  • 19,221
  • 20
  • 87
  • 122
25
votes
5 answers

Tool to extract java stack traces from log files

Is there any tool that can extract a list of stack traces appearing in the log file and probably count unique ones? EDIT: I would preffer something that is not GUI-based and be run on the background and give some kind of report back. I have quite…
Andrey Adamovich
  • 20,285
  • 14
  • 94
  • 132
25
votes
2 answers

NoClassDefFoundError: android.app.ANRManagerProxy

Does anyone know why this happens? I see this crash reported by my app but I have no idea what it is. java.lang.NoClassDefFoundError: android.app.ANRManagerProxy Thread: Binder_3, Exception: java.lang.NoClassDefFoundError:…
25
votes
4 answers

How do we track Javascript errors? Do the existing tools actually work?

Today I find the need to track and retrieve a Javascript error stacktrace to solve them. Today we were able to capture all rest calls, the idea is that once you get an error, automatically posts the stacktrace of that error plus the responses of the…
Da3
  • 261
  • 3
  • 7
25
votes
1 answer

StackTrace filename unknown

Something strange is happening in my code where I'm using a StackTrace. It's almost as if the debug info is not being loaded... but I'm running this on the DEBUG build.The .pdb files are definitelly in the bin directory and up to date. I've…
Radu094
  • 28,068
  • 16
  • 63
  • 80
24
votes
4 answers

How to log stack traces in node.js

Looking for a node.js package that handles stack tracing similar to how this is done in RoR: Rails: Logging the entire stack trace of an exception
Chris Abrams
  • 39,732
  • 19
  • 51
  • 57
24
votes
10 answers

How to determine main class at runtime in threaded java application?

I want to determine the class name where my application started, the one with the main() method, at runtime, but I'm in another thread and my stacktrace doesn't go all the way back to the original class. I've searched System properties and…
Erik R.
  • 7,152
  • 1
  • 29
  • 39
24
votes
4 answers

Boost stack-trace not showing function names and line numbers

I was exploring the boost::stacktrace by trying a simple example to print the call stack of a recursive function. #include "boost/stacktrace.hpp" int factorial(int x){ if (x < 2) { std::cout << boost::stacktrace::stacktrace(); …
motam79
  • 3,542
  • 5
  • 34
  • 60
24
votes
1 answer

C++ figure out if the debugger is attached

I use stackwalk64 to generate stacktraces for C++ in visual studio 2008 using the latest symchk.exe and dbghlp.dll. This works fine when I'm running the standalone exe. However, when the debugger is attached I deadlock visual studio. I previously…
Steve
  • 11,763
  • 15
  • 70
  • 103