Skip to content

Crashlytics: Unity SDK 6.1.1 Crash after Application.Quit() call #392

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

Closed
alperki opened this issue Jun 19, 2019 · 10 comments
Closed

Crashlytics: Unity SDK 6.1.1 Crash after Application.Quit() call #392

alperki opened this issue Jun 19, 2019 · 10 comments

Comments

@alperki
Copy link

alperki commented Jun 19, 2019

Unity editor version: 2017.4.27f1
Firebase Unity SDK version: 6.1.1
Firebase plugins in use : Analytics, Crashlytics
Additional SDKs you are using : Facebook, Admob, Zendesk, Zenject
Platform you are using the Unity editor on : Windows
Platform you are targeting : Android/iOS

Issue Description :

After upgrading firebase unity sdk from version 5.6 to 6.1.1 (we also migrated from fabric crashlytics to firebase crashlytics) we are experiencing application crash on our android builds , with the following log after we call Application.Quit() method in unity :

Caused by java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
Build fingerprint: 'samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXU4DSE4:user/release-keys'
Revision: '10'
pid: 29429, tid: 29610, name: Thread-49 >>> android.bundle.identifier <<<
r0 00000000 r1 e5ae79e0 r2 cd1349a8 r3 c757f320
r4 cd1349a8 r5 e5ae79e0 r6 00000000 r7 c757f300
r8 000072f5 r9 c757f970 sl c9cff9c8 fp c757f348
ip bb1aa154 sp c757f300 lr bb106127 pc bb1074d2 cpsr 0000000b

   at libFirebaseCppApp-6.firebase::crashlytics::Crashlytics::LogException(char const*, char const*, std::__ndk1::vector<firebase::crashlytics::Frame, std::__ndk1::allocator<firebase::crashlytics::Frame> >) + 5(crashlytics:5)
   at libFirebaseCppApp-6.Firebase_Crashlytics_CSharp_FirebaseCrashlyticsInternal_LogException + 54(Firebase_Crashlytics_CSharp_FirebaseCrashlyticsInternal_LogException:54)

After 3-4 seconds of application quit. We get native crash window "application x crashed". It affects our game vitals badly.

What is the cause of this crash ? Is it because of the latest sdk version ? Is there a fix on the way ?
Could you suggest a solution while we're waiting a fixed version of firebase sdk.

I tried to call :
FirebaseApp.DefaultInstance.Dispose(); before Application.Quit() but it doesn't solved the problem.

@alperki alperki added the new New issue. label Jun 19, 2019
@patm1987
Copy link

Thanks for filing an issue @alperki,

The crash log you've attached seems to be from an Android player, does it occur on iOS as well?

It would also help a ton if you could try to get us repro steps from one of the quickstarts (probably Crashlytics?): https://github.com/firebase/quickstart-unity/tree/master/crashlytics/testapp

--Patrick

@patm1987 patm1987 added type: question and removed new New issue. labels Jun 20, 2019
@okanyildiran
Copy link

okanyildiran commented Jun 20, 2019

We are observing the issue with Android 8 and 9 devices.

iOS seems fine.

I tried with quickstart testapp that @patm1987 mentioned. Same crash happens as well, with the same error log @alperki posted. It happens randomly

Unity editor version: 2017.4.27f1
Firebase Unity SDK version: 6.1.1

To reproduce the problem:

  1. Open the app with Android 8 or 9 device.
  2. Hit back button to exit the app.(Triggers Application.Quit).
  3. App crashes right after quit.

@patm1987
Copy link

Awesome, thanks for all your help. If anyone has anything else to add, let me know!

@stewartmiles stewartmiles changed the title Unity SDK 6.1.1 Crash after Application.Quit() call Crashlytics: Unity SDK 6.1.1 Crash after Application.Quit() call Jun 25, 2019
@stewartmiles
Copy link
Contributor

#394 smells related to this. I'm guessing we're seeing a crash that is being caught by Crashlytics.

@alperki could you share the complete adb logcat output?

You can capture adb logcat output by running the following the console...

adb logcat -c; adb logcat | tee logcat.log

then launching the application on the Android device. You can then attach logcat.log to this issue to share the logs.

@okanyildiran
Copy link

@stewartmiles I attached the logcat output of the quickstart-testapp that I mentioned.

logcat.log

@alperki
Copy link
Author

alperki commented Jun 26, 2019

@stewartmiles Here is the logcat from our original case on a Samsung SM-T820 device (Android 8.0)

logcat.txt

@hzor3000
Copy link

hzor3000 commented Jun 27, 2019

Hi @stewartmiles ,
Please be informed that the same crash happens in the following scenario:

Unity 2018.4.0f1 LTS
Firebase Unity SDK version: 6.1.1
LG G6 with android 8.0.0

Adding a the following code to a button click listener

throw new Exception("Text exception");

and pressing the button at any time.

logcat.txt

We are depending on a fix for this issue for an app release. Could you please update on the progress and provide any estimate on the date of expected fix?

Thank you in advance.

@stewartmiles
Copy link
Contributor

@alperki thanks for the log, in that case it looks like an exception happened while the application was shutting down and the crashlytics reporter was cleaned up before the crash such that when an exception was caught the reporter had already been destroyed and it hit a null pointer exception / segfault.

@hzor3000 if your application is crashing with throw new Exception("Test exception") this looks like a different issue. Our sample application does exactly the same thing and works fine, what else are you doing that is leading to this?

@stewartmiles
Copy link
Contributor

@alperki we have a fix for the crash on shutdown staged for release. We'll post an update when it's out.

@alexames
Copy link

alexames commented Jul 3, 2019

This should be fixed as of the latest release, 6.2.0

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