stack-trace

How to print exception stack trace of Objective-C exceptions with GNU runtime and without GNUStep?

徘徊边缘 提交于 2019-12-13 16:03:53
问题 I have an Objective-C app build on Linux with GCC 4.3 using no specific framework (only GNU-runtime). I am using Objective-C exceptions (via the '-fobjc-exceptions' compiler flag). Now I want to print the stack trace of such an exception when I caught some. Or what would make me even happier: put the trace in a string or some kind of structure to evaluate or print it later on. How can that be achieved? 回答1: NSArray * stack = [NSThread callStackSymbols]; It may help. 回答2: Since no more

Should I Print the Exception Stack Trace?

ぐ巨炮叔叔 提交于 2019-12-13 14:28:04
问题 How inefficient is it to get the stack trace for an exception? I know it's costly, but how costly? Should they definitely not be used in production environment? 回答1: In a production environment, it's helpful to log the stack trace so the user can find it when they contact tech support. Printing stack trace in place of an understandable (by the typical user) message should be avoided. You shouldn't be concerned with the efficiency of exceptional blocks of code. Error recovery is the most

New Google developer console crashes stack traces are not accurate anymore

你离开我真会死。 提交于 2019-12-13 12:42:59
问题 Google has recently updated the Google Play Console, and now crashes are automatically reported. Since almost all stack traces I got are not accurate anymore: The stack trace is full of <OR> methods, so I guess full of possible candidates? All the line numbers are 0 Note that I use Proguard (and not Multidex) and I strongly suspect it is the cause of the problem. Example: java.lang.ClassCastException: at <<MyPackage>>.adapters.PackageRecyclerViewAdapter.getItemCount(PackageRecyclerViewAdapter

Get stack trace of a crash on Windows without installing Visual Studio? (C++)

筅森魡賤 提交于 2019-12-13 11:34:22
问题 I have an C++ application, that crashes on a computer of some person on the other end of the world. There's no way for me to simulate it or get the same computer. The person is no developer, so I cannot really ask him to install Visual Studio or something. I have pretty deep debug logs, but they didn't reveal anything usable. Is there a tool, that could generate the stack trace of the application at the moment of the crash? Such thing is available inside OSX, but seems that Windows doesn't

NXlog ignores multiline tomcat stacktraces while sending to Papertrail

拥有回忆 提交于 2019-12-13 05:19:26
问题 I am able get the stacktrace[exceptions] from rsyslog (v-8.13.0) to a common nxlog server which sends the logs to a papertrail server. But the nxlog server ignores these multiline logs to papertrail. I know there is a module (xm_multiline) in nxlog which can parse this, but not sure on how to integrate this with my current nxlog configuration file: ######################################## # Global directives # ######################################## User nxlog Group nxlog LogFile /var/log

how to avoid strace in php

我的未来我决定 提交于 2019-12-13 03:41:34
问题 I'm having PHP + MySQL code base. If MySQL is stopped and during log-in it fails like this: Fatal error: Uncaught exception 'FrameworkException' with message 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' in /var/www/html/classes/class.connection.php:24 Stack trace: #0 /var/www/html/login.php(15): Connection::getInstance('localhost', 'user', '__password', 'DB') #1 /var/www/html/login.php(73): isDataValid('lakshmipathi.g@...', 'test') #2 {main} thrown in

Save RCP based Application's forced generated trace logs to a file

夙愿已清 提交于 2019-12-13 02:55:56
问题 I have a RCP application. I'm starting it with target set to "SomeApplication.exe" -debug -data >trace.log . I need to store all trace logging in trace.log log file. So I have added following options to config.ini org.eclipse.osgi/debug/loader=true org.eclipse.osgi/trace/classLoading=true I cannot save the logs as the classes are loaded during the application start up. I can see the logs on the CMD window as I have added the -debug . Is there any way to save the trace logs to a specified file

Eclipse opens wrong source file on exception

喜夏-厌秋 提交于 2019-12-12 22:55:58
问题 I have several Android projects in an Eclipse workspace: a stand-alone application project with a class my.package.Foo a library project with a different class my.package.Foo two application projects that depend on the library project and contain no source code The problem comes when working with one of the applications built on top of the library project. When it crashes (sadly, a frequent occurrence), I double-click on a line of the stack trace in the logcat to go to the relevant source.

How do you walk a mixed-mode (managed+native) stack with dbghelp!StackWalk64?

丶灬走出姿态 提交于 2019-12-12 14:53:22
问题 I'm trying to walk a callstack that contains both managed and native frames on a x64 process using StackWalk64. Everything works fine until the first or second managed frame, after which StackWalk64 can't figure out the return address of the frame and fails. I'm using SymFunctionTableAccess64 for the function table access callback and the symbol handler has been initialized with SymInitialize(). Is there some magic I need to do in dbghelp to get it to walk over managed frames correctly?

Finding exception in python multiprocessing

社会主义新天地 提交于 2019-12-12 11:20:05
问题 I have a bit of python code that looks like this: procs = cpu_count()-1 if serial or procs == 1: results = map(do_experiment, experiments) else: pool = Pool(processes=procs) results = pool.map(do_experiment, experiments) It runs fine when I set the serial flag, but it gives the following error when the Pool is used. When I try to print something from do_experiment nothing shows up, so I can't try/catch there and print a stack trace. Exception in thread Thread-2: Traceback (most recent call