"Android" uses NDK to locate crash

Source: Internet
Author: User

Sometimes the app or the game suddenly crashes only prompts the following information, to find the cause of the error feel a little bit, because the information is too small.

02-27 10:57:15.736:a/libc (32000): Fatal signal (SIGSEGV) at 0x0000000c (code=1), Thread 32014 (Thread-1461)
02-27 10:57:15.736:a/libc (32000): Send stop signal to pid:32000 in Debugger_signal_handler


At this point, you can use the Ndk-stack tool provided by the NDK to locate the crash location, as follows:

1. Open Cygwin.

2. Go to the NDK root directory.

CD $NDK _root

3. Connect the Android device and turn on debug mode.

4. Use ADB logcat to obtain log information and to channel the information to the Ndk-stack tool for analysis.

$ adb logcat |./ndk-stack-sym $ANDROID _project_path/obj/local/armeabi

$ANDROID _project_path represents the android root directory, Armeabi is the CPU architecture of the current device.

Example: $ adb logcat |./ndk-stack-sym/cygdrive/d/cocos2d-x/cocos2d-x-2.2.1/projects/angrybirds/proj.android/obj/local/ Armeabi

5. Open the app or game and do the crash.



This is the ndk-stack analysis of the crash information, you can see crash occurred in the Getallsprite method of Jsonparser.

"Android" uses NDK to locate crash

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.