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
24
votes
1 answer

Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference

MainActivity.java has following code: package com.softjourn.redmineclient.activities; import android.os.AsyncTask; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Base64; import…
Vitalii Romaniv
  • 731
  • 2
  • 8
  • 17
24
votes
3 answers

How to output a deep stack trace in node.js?

When a normal exception occurs, a stack trace like the following is outputted: util.js:38 case '%s': return String(args[i++]); ^ TypeError: Cannot convert object to primitive value at String (unknown source) at…
Tom
  • 8,536
  • 31
  • 133
  • 232
23
votes
3 answers

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. …
Drew Shafer
  • 4,740
  • 4
  • 30
  • 42
23
votes
4 answers

How to get stack trace string without raising exception in python?

traceback.format_exc() can get it with raising an exception. traceback.print_stack() prints the stack without an exception needed, but it does not return a string. There doesn't seem to be a way to get the stack trace string without raising an…
user299648
  • 2,769
  • 6
  • 34
  • 43
23
votes
5 answers

Detect Who Created a Thread (w. Eclipse)

How can I find out who created a Thread in Java? Imagine the following: You use ~30 third party JARs in a complex plugin environment. You start it up, run lots of code, do some calculations and finally call shutdown(). This life-cycle usually…
EoH
  • 821
  • 6
  • 9
22
votes
4 answers

PHP - Log stacktrace for warnings?

Is it possible to log stacktraces for php warnings? Or catch a warning and error_log() it? There's some code causing warnings in my error log, but it's impossible to know what's causing these warnings without knowing the stack trace.
quano
  • 18,812
  • 25
  • 97
  • 108
22
votes
1 answer

ASP.NET Core 2.0 using Serilog to log stacktrace when exception is thrown

So I've recently started to build a asp.net core application and for the logging i'm using SeriLog. This was working fine until recently I found out that most of the time the stacktrace of an exception is not being transferred to my logs. I'm using…
Jeroen
  • 1,625
  • 3
  • 16
  • 28
22
votes
3 answers

How to rethrow the inner exception of a TargetInvocationException without losing the stack trace

I have many methods which are calling using Delegate.DynamicInvoke. Some of these methods make database calls and I would like to have the ability to catch a SqlException and not catch the TargetInvocationException and hunt through its inners to…
22
votes
2 answers

How can I get a JS stack trace without halting the script?

If you throw in JavaScript, the thrown error will usually propagate to the window.onerror handler which can stop the further execution of a script. Is there any way to get a stack trace from within a function without causing this halting of…
Bryce
  • 6,440
  • 8
  • 40
  • 64
22
votes
3 answers

Trace: requestLayout() improperly called?

Can anyone tell me how to fix the following trace: W/View (16810): requestLayout() improperly called by theme.effects.TopCenterImageView{41dc73f0 V.ED.... ........ 0,0-480,690 #7f060066 app:id/normal_image} during second layout pass: posting…
Aashir
  • 2,621
  • 4
  • 21
  • 37
22
votes
3 answers

How can I interpret a .stackdump file?

this question is likely a repeat of Using a stackdump from Cygwin executable - but I'm a beginner, and I didn't understand the answers, or even parts of the question. I'm pretty new to c++ and programming and I'm developing in NetBeans. I'm working…
jlsecrest
  • 537
  • 1
  • 5
  • 15
21
votes
2 answers

Stack trace with line numbers when running cargo run

Doing RUST_BACKTRACE=1 cargo run gives a stack trace when an error occurs as shown below. Is there any way to get the file & line number instead of the hex address? thread '
' panicked at 'called `Result::unwrap()` on an `Err` value: Parsing:…
Bilal Syed Hussain
  • 8,664
  • 11
  • 38
  • 44
21
votes
2 answers

How do I make a thread dump with MONO?

How can I show the threads (stacktraces) in a hanging application that run with MONO? I know that I can do it in .NET with the Managed Stack Explorer (MSE). Because the application hang only with MONO that I need to do it with MONO. Or there are…
Horcrux7
  • 23,758
  • 21
  • 98
  • 156
20
votes
1 answer

Node.JS: Tool to see why process is still running?

Is there a way to see what timeouts, intervals or async operations (or endless loops) are still running and are stopping my process from ending? I have been able to figure it out so far without such a tool, but such a tool would be very handy…
700 Software
  • 85,281
  • 83
  • 234
  • 341
20
votes
3 answers

Crashlytics' stacktraces show file name as Unknown Source while Dexguard is enabled

I've got a problem with my crash reports from Fabric Crashlytics when I enable Dexguard in my project. I enabled Dexguard in my project and it works pretty well. Then I followed the instructions in this this page and added the mentioned…
Amin
  • 1,034
  • 10
  • 17