androidandroid-ndkcrittercism

Crittercism catching native exceptions in Android?


I'm helping develop an app that uses a 3rd party library which uses the NDK. However, whenever I try to enable NDK reporting, I don't see any actual crashes in the live alerts:

        CrittercismConfig config = new CrittercismConfig();
        config.setNdkCrashReportingEnabled(true);
        Crittercism.initialize(getApplicationContext(), "myCrittercismId", config);

How do I capture native crashes with Crittercism?

Alternatively, we do have this other library that can capture native crashes and dump them into a file. However, I couldn't find a way to upload just a raw file with a Handled Exception for Crittercism. How is this usually done? Where you want to upload custom data that is associated with a crash?


Solution

  • Your first question is a duplicate of:

    Crittercism on Android with NDK?

    Crittercism doesn't currently provide a way to pass along custom crash data for native crashes since our system currently uses a particular process for server-side symbolication. Without this symbolication, the raw file won't be much help anyway.

    The following code is actually legacy from older libraries and no longer necessary with the latest:

    config.setNdkCrashReportingEnabled(true);
    

    Lastly, make sure that the other crash handler isn't interfering with Crittercism, otherwise you won't see any reports on the portal. If you check didCrashOnLastLoad (following these instructions) this should check to see if a crash file was created where Crittercism stores them to get sent.