stack-trace

How to get the stacktrace in a mobile device?

这一生的挚爱 提交于 2019-12-12 10:50:05
问题 I'm getting a NullPointerException in a Nokia S40. I want to know what is causing this exception. The device shows: NullPointerException java/lang/NullPointerException This error only occurs in the device, running in the emulator the application works fine. I use microlog to debug my application. But the application works fine if the log is enabled. Is there a way to get the stack trace when I get this NullPointerException? I don't need all details like the line number just which method cause

Exceptions lose part of stacktrace in try/catch context

和自甴很熟 提交于 2019-12-12 10:49:30
问题 I have two examples. In the first case, debugger catches the unhandled exception: static void Main(string[] args) { Exec(); } static void Exec() { throw new Exception(); } And the exception has full stacktrace: at ConsoleApplication28.Program.Exec() at ConsoleApplication28.Program.Main(String[] args) at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft

Is there any way to tell the arguments of the method calling a function in c#?

僤鯓⒐⒋嵵緔 提交于 2019-12-12 08:48:12
问题 I'm working on a hands-off log mechanism for my c# application. Here's what I'd like it to look like: function a(arg1, arg2, arg 3.....) calls function b(arg4,arg5,arg6....) , which in turn calls log() which is than able to detect the stacktrace (this can be done via Environment.StackTrace ) and the values with which each function (e.g. a and b ) in the stacktrace is called. I want it to work in debug and release mode (or, at least, in debug mode). Is this possible to do in .net? 回答1:

How to log exceptions with network targets in NLog

好久不见. 提交于 2019-12-12 08:41:26
问题 I am using the NLog logging framework and am trying to get exception and stacktrace information showing up in any UDP logger appliaction, such as Sentinel and Log2Console, but can only get the log message part displayed. Outputting to a file works well as most examples do just that, so the problem revolves around using network targets with NLog. Bonus if a custom format can be applied on inner exceptions and stacktrace, but this is not required. Exception.ToString() would go a long way. Note

Using promises - Logging stack trace in fail handler

我与影子孤独终老i 提交于 2019-12-12 08:17:26
问题 I am rather new to nodejs so I will explain in a bit more detail what I am trying to do. I have a webserver. If a request fails I want to log the stack trace of that exception, but deliver a error page and not crash the server. As an example, the function handling the requests: var Q = require('q'); var requestHandler = function () { // Here I get the data etc. that was requested. As this is not important, just a dummy here Q.resolve() // Now I answer the request .then(function (data) { //

C++ Stack Tracing issue

ぃ、小莉子 提交于 2019-12-12 08:07:56
问题 I am working on a class which I would like to use to log the current Call Stack on computers with Windows Vista/7. (Very similar to “Walking the callstack” http://www.codeproject.com/Articles/11132/Walking-the-callstack). First I used RtlCaptureContext to get the current context record then I used StackWalk64 to get the individual stack frames. Now, I realized that the Program counter in STACKFRAME64.AddrPC actually changes for a specific code line whenever I close my program and start it

NSRangeException: Call Stack Not Showing Line Number

本小妞迷上赌 提交于 2019-12-12 07:58:09
问题 I am getting the following index out of bounds error: *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array' *** First throw call stack: (0x2263052 0x24c7d0a 0x224fdb8 0x2f4a7 0x2264ec9 0x81e299 0x81e306 0x75aa30 0x75ac56 0x741384 0x734aa9 0x39a9fa9 0x22371c5 0x219c022 0x219a90a 0x2199db4 0x2199ccb 0x39a8879 0x39a893e 0x732a9b 0x1e5b 0x1dc5 0x1) I know exactly what the error means, but I find these

ArrayIndexOutOfBoundException

≯℡__Kan透↙ 提交于 2019-12-12 02:57:37
问题 StackTrace: 08-19 08:47:02.189: E/AndroidRuntime(1857): FATAL EXCEPTION: main 08-19 08:47:02.189: E/AndroidRuntime(1857): Process: com.loco.android, PID: 1857 08-19 08:47:02.189: E/AndroidRuntime(1857): java.lang.ArrayIndexOutOfBoundsException: length=1; index=4 08-19 08:47:02.189: E/AndroidRuntime(1857): at com.sit.loco.frgment.VideoListFragment.onCreateView(VideoListFragment.java:117) 08-19 08:47:02.189: E/AndroidRuntime(1857): at android.support.v4.app.Fragment.performCreateView(Fragment

Stack track determination and open gl dlls

我的梦境 提交于 2019-12-12 02:52:45
问题 After being able to determine call stack successfully (in my previous questions) - I was bit puzzled with opengl drivers. KERNELBASE.dll GlobalAlloc (00007FF995B09643) nvoglv64.DLL DrvPresentBuffers (0000000054F22747) nvoglv64.DLL DrvPresentBuffers (0000000054F20893) nvoglv64.DLL DrvPresentBuffers (0000000054F221B2) nvoglv64.DLL (0000000054A6D79A) nvoglv64.DLL (0000000054BA478A) nvoglv64.DLL (0000000054BA60B5) myown.dll my own source code(line) (00007FF96CCB6B73) What I've briefly analyzed -

how to generate a stack trace from a core dump file in C, without invoking an external tool such as gdb

南笙酒味 提交于 2019-12-12 02:21:07
问题 I am looking for a simple way to pull the stack trace out of a Linux core dump file programmatically, without having to invoke gdb. Anybody has an idea? To avoid confusion: I am not looking for a way to get my own back trace from inside a process. I am looking for a way to get a backtrace out of a completely independent core dump file I have. 回答1: If you really can't invoke gdb, but want a backtrace like the ones it provides, you could just copy the bits of gdb's source that are needed for