Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashlytics-ndk crashes when app exit #1749

Closed
fbafelipe opened this issue Jul 2, 2020 · 5 comments
Closed

crashlytics-ndk crashes when app exit #1749

fbafelipe opened this issue Jul 2, 2020 · 5 comments
Assignees

Comments

@fbafelipe
Copy link

  • 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).

@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@kmandrika
Copy link
Contributor

Thanks for reporting this @fbafelipe - we'll prioritize fixing this asap.

@kmandrika
Copy link
Contributor

@fbafelipe a fix has been submitted and should roll out with the next release.

@kmandrika
Copy link
Contributor

@fbafelipe the fix for this issue has been released, please upgrade to the latest SDK & let us know if the issue still persists!

@fbafelipe
Copy link
Author

@kmandrika I tried the new version. It did fix the problem. Thanks!

@firebase firebase locked and limited conversation to collaborators Sep 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants