我在堆栈跟踪中看到了这一点:
myorg.vignettemodules.customregistration.NewsCategoryVAPDAO.getEmailContentByID(I)Lmyorg/pushemail /模型/ EmailContent;
" (I)L"是什么意思?
如果我的C++应用程序在Windows上崩溃,我想向我们的服务器发送有用的调试信息.
在Linux上我会使用GNU backtrace()函数 - 是否有Windows的等价物?
有没有办法在程序崩溃后提取有用的调试信息?或者只是从过程中?
(根据"测试你的应用程序,所以它不会崩溃"的建议是没有用的! - 所有非平凡的程序都会有bug)
正如我所注意到的,logcat总是返回34行的crashlog,如下所示:
4cf7c700 401c0000
4cf7c704 48463ff0
4cf7c708 44d11f7c
4cf7c70c afd0cd89
4cf7c710 00000000
4cf7c714 82ab29dc libmyproject.so
4cf7c718 00000000
4cf7c71c 4cf7c73c
4cf7c720 836c44f0 libmyproject.so
4cf7c724 82f3a414 libmyproject.so
4cf7c728 4cf7c768
4cf7c72c 0000008d
4cf7c730 007ea0a8 [heap]
4cf7c734 00270100 [heap]
4cf7c738 e3a07077
4cf7c73c ef900077
4cf7c740 00000000
4cf7c744 4cf7c774
4cf7c748 836c44f0 libmyproject.so
4cf7c74c 00000000
4cf7c750 836c44f0 libmyproject.so
4cf7c754 82f63768 libmyproject.so
4cf7c758 00000000
4cf7c75c 4cf7c7e4
4cf7c760 00000000
4cf7c764 00000001
4cf7c768 00000000
4cf7c76c 0badc0de
4cf7c770 fffffff8
4cf7c774 00000000
4cf7c778 00000168
4cf7c77c 00000009
4cf7c780 00000200
4cf7c784 00000000
Run Code Online (Sandbox Code Playgroud)
但是我知道堆栈也保存到了/date/tombstones/tombstone_0[0-9].在那里,我可以找到许多其他堆栈(我不完全理解它们来自哪里),其中一些是上述堆栈的两倍. …
有没有办法配置Play!在dev错误页面上显示错误的完整堆栈跟踪?
默认的异常视图非常好,但如果使用Preconditions之类的东西,则无用.
我知道你可以通过日志获取它,但在dev错误页面上看到它会很高兴.
我的应用程序导致一个强制关闭某个地方,但我没有在我的LogCat中获得通常(且信息量很大)堆栈跟踪的致命异常,我只收到以下4行:
06-27 07:08:54.546: D/dalvikvm(14351): GC_FOR_MALLOC freed 9923 objects / 657416 bytes in 21ms
06-27 07:08:54.769: W/dalvikvm(14351): threadid=20: thread exiting with uncaught exception (group=0x4001d7f0)
06-27 07:08:54.796: W/dalvikvm(14351): threadid=21: thread exiting with uncaught exception (group=0x4001d7f0)
06-27 07:08:54.796: I/Process(14351): Sending signal. PID: 14351 SIG: 9
Run Code Online (Sandbox Code Playgroud)
这是在DEBUG模式下,LogCat上没有应用过滤器!
更新:感谢下面的@assylias,我已经能够实现:
final UncaughtExceptionHandler subclass = Thread.currentThread().getUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread paramThread, Throwable paramThrowable) {
Log.getStackTraceString(paramThrowable);
subclass.uncaughtException(paramThread, paramThrowable);
}
});
Run Code Online (Sandbox Code Playgroud)
这产生了这些增加的线:
06-27 08:24:47.105: D/dalvikvm(15475): GC_FOR_MALLOC freed 13865 objects / 1435952 bytes in …Run Code Online (Sandbox Code Playgroud) 我有一个来自用户的控制台堆栈(不是崩溃报告),我正在尝试确定我的应用程序中哪个方法调用是最后一个人.
我知道他们正在使用哪个版本的应用程序,并且我有一个该发布/调试版本的副本,以及存档副本的dSYM文件.
但是,当我尝试使用atos吐出内存地址时,它似乎没有帮助.(我在0x000000010e703bc0下面的堆栈中使用.)
craig-mbp:Desktop Craig$ atos -o MyApp.app_1.0.0.dSYM/Contents/Resources/DWARF/MyApp -arch x86_64
0x000000010e703bc0 (<- entered by me)
0x000000010e703bc0 (<- console output)
Run Code Online (Sandbox Code Playgroud)
我需要输入某种偏移吗?或者根据用户提供给我的地址,某种内存地址数学来确定程序内存块中的实际位置?
这是我收到的堆栈跟踪的总和:
28/11/12 10:48:56.220 AM MyApp[411] (
0 CoreFoundation 0x00007fff8fee90a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8e94a3f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8fee8e7c +[NSException raise:format:] + 204
3 Foundation 0x00007fff92b1ce5c -[NSPlaceholderString initWithString:] + 93
4 Foundation 0x00007fff92b1cde4 +[NSString stringWithString:] + 43
5 MyApp 0x000000010e703bc0 MyApp + 23488
6 MyApp 0x000000010e70a038 MyApp + 49208
7 MyApp 0x000000010e70b41a MyApp + …Run Code Online (Sandbox Code Playgroud) 当在IE 8中抛出JavaScript异常时,如何查看其堆栈跟踪?
例如,jQuery中的以下代码捕获异常并重新抛出它.在Visual Studio(2012)中进行调试时,执行会在jQuery捕获异常('e')时中断,但我不能在生命中看到异常源自的堆栈跟踪:
// resolve with given context and args
resolveWith: function( context, args ) {
if ( !cancelled && !fired && !firing ) {
firing = 1;
try {
while( callbacks[ 0 ] ) {
callbacks.shift().apply( context, args );
}
}
// We have to add a catch block for
// IE prior to 8 or else the finally
// block will never get executed
catch (e) {
throw e;
}
finally {
fired = [ context, args …Run Code Online (Sandbox Code Playgroud) javascript debugging exception stack-trace internet-explorer-8
我使用cocos2d-x开发游戏,在iOs中运行完美后,我转向Android平台.
但它在android中运行,我只收到一些错误日志:
08-26 10:49:23.823: A/libc(2884): Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 2917 (Thread-285)
Run Code Online (Sandbox Code Playgroud)
有了这个,我无法修复崩溃日志.
所以我的问题是如何检查崩溃日志的堆栈?
在SO中,有一些类似的问题,但对我没有任何有用的答案.
Heroku上的暂存站点正在抛出错误.日志级别调试(heroku config:set LOG_LEVEL = debug)在运行日志时没有提供完整的堆栈跟踪(heroku logs -n500 -aheroku-app-name -t).
如何在没有任何帐户插件的情况下启用堆栈跟踪?
是否可以为开发工具设置为source-map的缩小包的webpack生产环境获取可读的堆栈跟踪?我正在运行 Typescript 并与 Webpack 构建做出反应。下面的清单显示了引发异常的示例:
http://localhost:8080/vendors~course-list.3042c44300bc08021f63.bundle.js:2:6029
http://localhost:8080/vendors~course-list.3042c44300bc08021f63.bundle.js:2:5067
in w in b in withRouter(b) in e in e in Suspense in div in e in e in S
Run Code Online (Sandbox Code Playgroud)
在上面的堆栈跟踪中,可以通过将 devtool 选项设置为source-map进行以下观察:
stack-trace ×10
android ×3
java ×3
c++ ×2
debugging ×2
exception ×2
javascript ×2
android-ndk ×1
backtrace ×1
cocos2d-x ×1
crash ×1
heroku ×1
logcat ×1
logging ×1
objective-c ×1
tombstoning ×1
windows ×1
xcode ×1