Appcenter: Native C++ crashes are not uploaded on Android

Created on 12 Mar 2019  路  16Comments  路  Source: microsoft/appcenter

What App Center service does this affect?
Diagnostics - Crashes

Describe the bug
As described here in the sample code: https://github.com/Microsoft/AppCenter-SDK-Android/blob/develop/apps/sasquatch/src/main/java/com/microsoft/appcenter/sasquatch/activities/MainActivity.java#L168-L178, we are expecting App Center SDK to show native crash reports. However no report was shown under Diagnostics - Issues from the console.

To Reproduce
Steps to reproduce the behavior:

  1. Loaded the libnative library. Set up Breakpad.
  2. Set up listener and attached NDK Crash Handler after SDK is initialized during onCreate().
  3. Initialize a native crash like a dereferenced null pointer.
  4. Observe.

Expected behavior
A native crash report is shown from the console.

Smartphone (please complete the following information):
Android API 28 emulator, App Center SDK version 1.11.3

Additional context
Is there any doc explaining how to setup the crash listener properly?

bug diagnostics

All 16 comments

Hi @patniko thanks for the prompt reply. We have the listener and native crash code set up on our end. The dump file has been successfully generated. However the crash report was not shown on the consule.

Does a crash group not appear at all or does the specific crash not have an attachment with the dump file?

Yeah the crash group was not appeared at all.

Personal steps I would follow:

  1. Make sure you see the crash being picked up and reported in logcat
  2. Check to see if native Java crashes show up to rule out a general non-breakpad problem
  3. Reach out to intercom chat within the App Center portal. If you make it this far, chances are we'll need to look into our backend to check out logs specific to you.

Failed on step 1. I tried to verify this line https://github.com/Microsoft/AppCenter-SDK-Android/blob/2529aaf242a818693803eedd5b5a634b013b5e77/sdk/appcenter-crashes/src/main/java/com/microsoft/appcenter/crashes/Crashes.java#L573 but didn't get any log.

The dump file was there though: /data/user/0/<app id>/files/error/minidump/new. Any suggestion?

@Songroid - do you mind reaching out in the blue chat bubble on the bottom right of the App Center portal? This way our support and engineering teams can take a deeper look for you. Thanks!

You should check that you setted up Breakpad to dump crashed into Crashes.getMinidumpDirectory()

@ufna Yes it's setup correctly. Did you see the native crash report with AC?

@Songroid , yes, I've just implemented sdk support for UE4 and it works as it should.

But in my case I also had to build breakpad with ndk version 16 with some tricks like APP_STL := gnustl_static and APP_PLATFORM := android-19, because with latest ndk version and 'APP_STL := c++_static' DumpCallback function had empty descriptor.path()

@ufna Thank you! I will check on my end.

Breakpad does not work for me on x86 emulators. It does not save the minidump on that architecture at least on emulator.
So far it seems to work only on ARM devices and ARM emulator (I don't have a real x86 device to test on).
It's not a bug in AppCenter though but in breakpad.

Are you using the latest master commit of the official breakpad repository? The fork we use in Sasquatch test application is very old, so the results might be different with latest version.

Thanks for following up. Yes I tried it out and got unsymbolicated crashes.
Should I follow https://docs.microsoft.com/en-us/appcenter/diagnostics/android-ndk to symbolicate the crashes?

Yes unsymbolicated crashes will remain that way until you upload matching symbols.

Thank you for your help. Please feel free to close this.

@Songroid Do you mind sharing how did you solve this issue? Did you switch the breakpad version to the one that Sasquatch sample app is using?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

invariant picture invariant  路  3Comments

DouglasMarq picture DouglasMarq  路  4Comments

patrickdoodyIRL picture patrickdoodyIRL  路  3Comments

thabemmz picture thabemmz  路  3Comments

Oddj0b picture Oddj0b  路  3Comments