O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – analysing a crash dump

  1. Let's introduce a fatal bug in the code. Open jni/DroidBlaster.cpp and modify method onActivate() as follows:
    ...
        void DroidBlaster::onActivate() {
            ...
            mTimeService = NULL;
            return packt::STATUS_KO;
        }
    ...
  2. Open the LogCat view (from Window | Show View | Other...) in Eclipse and then run the application. Not pretty for a candid Android developer! A crash dump appeared in the logs:
    ... *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'htc_wwe/htc_bravo/bravo:2.3.3/... pid: 1723, tid: 1743 >>> com.packtpub.droidblaster <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000c r0 a9df2e71 r1 40815c8d r2 7cb9c28d r3 00000000 ... ip a3400000 sp 45102830 lr 00000016 pc 80410a2c ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required