Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Native Crashes: What are they and how to debug them?

I have been seeing Crashes and ANR reports on Play Store for my app, and there seems to be a particular type of crashes - Native Crashes which are occurring in certain Samsung Devices running Lollipop (Android 5.0+). An example of such a log:

"*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'samsung/a7ltexx/a7lte:5.0.2/LRX22G/A700FDDDU1BPC3:user/release-keys' Revision: '7' ABI: 'arm' pid: 28219, tid: 28219, name: packagename >>> packagename <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 Abort message: 'sart/runtime/thread.cc:1116] Throwing new exception 'Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference' with unexpected pending exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference' r0 b9056770 r1 00000000 r2 00001002 r3 00000000 r4 b9056770 r5 b8ab18f0 r6 00000010 r7 b50f3c64 r8 be8ef978 r9 be8ef908 sl be8ef958 fp b7b95d60 ip b9056774 sp be8ef874 lr b50236ef pc b4ea3b3a cpsr 680d0030


00 pc 000acb3a /system/lib/libart.so (std::1::basic_ostream<char, std::1::char_traits<char> >& std::1::operator<< <char, std::1::char_traits<char>, std::1::allocator<char> >(std::1::basic_ostream<char, std::__1::char_traits<char> >&, std::1::basic_string<char, std::1::char_traits<char>, std::__1::allocator<char> > const&)+5)

01 pc 01124974 [heap]"

Seth Kroger
Seth Kroger
56,412 Points

Did you use the Native Development Kit in your app? There are docs for tools you can try: http://developer.android.com/ndk/guides/debug.html