Common Android native crashes and causes of errors

Source: Internet
Author: User

http://www.droidsec.cn/%E5%B8%B8%E8%A7%81android-native%E5%B4%A9%E6%BA%83%E5%8F%8A%E9%94%99%E8%AF%AF%E5%8E%9F%E5%9B%A0/

The crash on Android can be divided into two types:

1. Java Crash
The Java code causes the JVM to exit and the "program has crashed" dialog box pops up, and the end user clicks Close and the process exits.
Logcat will output Java's call stack under "androidruntime" tag.

2, Native Crash
Using the NDK, the development of C/D + + resulted in the process receiving an error signal, the process exited before Crash,android 5.0 (flashback), and Android 5.0 then bounced the "Program crashed" dialog box.

The Logcat will output the dump message under "DEBUG" tag:

  • Error Signal : 11 is the semaphore SIGNUM,SIGSEGV is the name of the signal, Segv_maperr is a type under SIGSEGV.
  • Register Snapshot : A register snapshot saved when the process receives an error signal, where the PC register stores the next instruction to be run (where the error occurred).
  • Call stack : #00是栈顶, #02是栈底, #02调用 #01 call #00 method, # 00 method when libspirit.so in the Spirit class under the Testcrash method, where the error is Testcrash method within the assembly offset 17 (not the line number Oh!). )

Common Android native crashes and causes of errors

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.