crashlytics-ndk crashes when app exit
See original GitHub issue- Android Studio version: 3.6.1
- Firebase Component: firebase-crashlytics-ndk
- Component version: 17.1.0
- ndkVersion: 21.2.6472646
Steps to reproduce:
When my app exit, by calling exit(0) on native code, the app crashes. After some investigation, the crash seems to be on crashlytics-ndk itself. Removing crashlytics-ndk (keeping crashlytics), stops the crashes.
Relevant Code:
********** Crash dump: **********
Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys'
Abort message: 'Invalid address 0xf1bc0008 passed to free: value not allocated'
#00 0x00000b39 [vdso:f4785000] (__kernel_vsyscall+9)
#01 0x0001fdf8 /system/lib/libc.so (syscall+40)
#02 0x00022ed3 /system/lib/libc.so (abort+115)
#03 0x000b08be /system/lib/libc.so (ifree+1134)
#04 0x000b0a0d /system/lib/libc.so (je_free+125)
#05 0x0001652a /system/lib/libc.so (free+42)
#06 0x00024444 /data/app/com.catnigiri.dinozoneclassic-6svCKVIalhG0tMriQ4M6UQ==/lib/x86/libcrashlytics.so (operator delete(void*)+36)
#07 0x0000f6ac /data/app/com.catnigiri.dinozoneclassic-6svCKVIalhG0tMriQ4M6UQ==/lib/x86/libcrashlytics.so (google::crashlytics::handler::detail::finalize()+44)
#08 0x0000d0ed /data/app/com.catnigiri.dinozoneclassic-6svCKVIalhG0tMriQ4M6UQ==/lib/x86/libcrashlytics.so
#09 0x0009223a /system/lib/libc.so (__cxa_finalize+202)
#10 0x0001604a /system/lib/libc.so (exit+42)
#11 0x004b84a6 /data/app/com.catnigiri.dinozoneclassic-6svCKVIalhG0tMriQ4M6UQ==/lib/x86/libgame.so (fenix::FenixExit(int)+70)
??
??:0:0
#12 0x0044fe4e /data/app/com.catnigiri.dinozoneclassic-6svCKVIalhG0tMriQ4M6UQ==/lib/x86/libgame.so (fenix::GameContainer::mainLoopStep()+78)
I checked the source code from crashlytics-ndk, I might be wrong, but the problem seems to be detail::breakpad_context being allocated by a custom allocator on install.cpp:131 (function install_signal_handler), but it is being free’d by just calling delete on install.cpp:71 (function finalize, this is the line crashing).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
C++ Crashlytics NDK crashes when used with header
On C++ side (replace com_xxx_lib with your package id): #include "Crashlytics.h" extern "C" { JNIEXPORT void JNICALL ...
Read more >Crashlytics troubleshooting and FAQ - Firebase
Crashes are poorly symbolicated. If your stack traces seem to be poorly symbolicated, check the following: If frames from your app's library lack...
Read more >Crashes | Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >Android Crash Reporting & Error Monitoring | Bugsnag Platform
Automatically capture crashes in apps written in native code languages with Bugsnag support for NDK. A quick install and you'll get info on...
Read more >Android NDK Firebase Crashlytics Symbolication for C++
I'm getting NDK Crashes in Firebase from my Android app written in java, but there is no symbolication for them, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fbafelipe the fix for this issue has been released, please upgrade to the latest SDK & let us know if the issue still persists!
Thanks for reporting this @fbafelipe - we’ll prioritize fixing this asap.