我的应用程序因.so文件而崩溃<我跟踪了这个链接https://developer.android.com/ndk/guides/ndk-stack.html
使用上面的链接,我可以从log cat获取堆栈跟踪转储
从堆栈跟踪中,它显示了使用ndk堆栈工具的所有函数名
但我无法找出是哪种方法导致我的应用程序崩溃
这是我应用程序中的日志,说明了致命信号。
id: 26940, tid: 27543, name: Thread-579 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
它显示错误地址0x34,但是使用ndk-stack工具,它显示了所有带有函数名的线程,但是哪一个导致了崩溃呢??< br>
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 26940, tid: 27543, name: Thread-579 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155638 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_thread_create at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:570 (discriminator 5)
Stack frame #01 pc 0011973f /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:667 (discriminator 2)
Stack frame #02 pc 00155471 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:214 (discriminator 2)
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 28169, tid: 28422, name: Thread-618 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155638 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_thread_create at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:570 (discriminator 5)
Stack frame #01 pc 0011973f /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:667 (discriminator 2)
Stack frame #02 pc 00155471 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:214 (discriminator 2)
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 29519, tid: 30349, name: Thread-620 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 10036, tid: 10963, name: Thread-755 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 11338, tid: 11813, name: Thread-751 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 12197, tid: 12384, name: Thread-801 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-2/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 14140, tid: 14798, name: Thread-808 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
********** Crash dump: **********
Build fingerprint: 'Xiaomi/land/land:6.0.1/MMB29M/V8.5.4.0.MALMIED:user/release-keys'
pid: 15644, tid: 16119, name: Thread-839 >>> com.nexge.nexgeotpdialer <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x34
Stack frame #00 pc 00155660 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (pj_thread_destroy+3): Routine pj_enter_critical_section at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:1094
Stack frame #01 pc 00119763 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (start_signal+238): Routine check_rx_late_pkt at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjmedia/build/../src/pjmedia/compressed_rtp.c:672
Stack frame #02 pc 00155499 /data/app/com.nexge.nexgeotpdialer-1/lib/arm/libpjsua2.so (thread_main+40): Routine pj_init at /home/protocol/Jeeva/PJSIPWorks/AESEncryption/pjlib/build/../src/pj/os_core_unix.c:218
Stack frame #03 pc 0004185b /system/lib/libc.so (_ZL15__pthread_startPv+30)
Stack frame #04 pc 000192a5 /system/lib/libc.so (__start_thread+6)
Crash dump is completed
我也在寻找跟踪SIGSEGV故障的方法。我决定自己做跟踪。https://github.com/claytonfan/trace用法:
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include "trace.h
void sig_handler(int signo)
{
if( signo == SIGSEGV ) {
traceDump("Signal SIGSEGV");
}
// may handle other signo's
exit( signo );
}
int main(int argc, char **argv)
{
traceInit( "Prgram Test", &printf, 0 );
signal( SIGSEGV, sig_handler );
//
// and possibly other signals
//
// . . . main() logic . . .
return( 0 );
}
希望有所帮助。
前言我改了标题。很难理解为什么在调试时,有时未被捕获的异常会向Logcat输出“致命异常”,而有时不会。 下面的简化示例在我到达 line 时崩溃了。Logcat 内部没有堆栈跟踪或其他指示,说明出了什么问题。我运行的是 Android Studio 3.0.0beta4。 为什么它会崩溃?(更新-崩溃是由于安全例外) 为什么Logcat不显示堆栈跟踪或其他错误 更新好了,我知道它为什么崩溃了。我
问题内容: 程序中没有单个方法“知道”它在堆栈中的位置。它所知道的只是它自己的小工作,它完成了并返回了。因此,当引发异常并打印堆栈跟踪时,它是从哪里来的? 在JVM中监视程序状态的每个应用程序旁边隐式地运行着一个单独的线程吗?还是JVM本身保存此信息,并且在抛出异常时以某种方式从异常中提取数据? 如果是上述两种情况之一,是否可以使用某些调用来检索堆栈跟踪(从监视器线程或JVM) 而不会 引发异常?
当Xdebug被激活时,只要PHP决定显示通知,警告,错误等,就会显示堆栈跟踪。堆栈跟踪显示的信息以及显示方式可以根据您的需要进行配置。 Xdebug在错误情况下显示的堆栈跟踪信息量相当保守(如果display.errors 在php.ini中设置为On)。这是因为大量的信息会减慢脚本的执行速度和浏览器中堆栈跟踪本身的渲染速度。但是,可以使堆栈轨迹以不同的设置显示更详细的信息。 堆栈跟踪中的变量
问题内容: 假设您执行 e.printStackTrace() ,则捕获到一个异常并在标准输出(例如控制台)上获得以下内容: 现在,我想将其发送给log4j之类的记录器,以获取以下信息: 我怎样才能做到这一点? 问题答案: 您将异常直接传递给记录器,例如 取决于log4j来呈现堆栈跟踪。
问题内容: 更新 :Intellij IDEA的最新版本完全实现了我想要的功能。问题是如何在IDE外部实现此功能(以便我可以将异步堆栈跟踪信息转储到日志文件中),理想情况下无需使用检测代理。 自从我将应用程序从同步模型转换为异步模型以来,调试故障一直遇到问题。 当我使用同步API时,我总是在异常stacktraces中找到我的类,因此我知道从哪里开始寻找问题。使用异步API,我得到的堆栈跟踪既不引
如何将堆栈跟踪打印到logcat? 当应用程序在Eclipse中运行并且应用程序崩溃时,我会在logcat窗口中收到一系列消息,如“致命异常:main”,并打印堆栈跟踪。但是,当我从命令行使用adb logcat命令时,我没有看到任何这些消息?我看到的只是一条信息,上面写着一个例子。应用程序已经死了。 如何使用adb logcat命令获得Eclipse logcat窗口中显示的相同堆栈跟踪? 编辑