googleads-mobile-unity
googleads-mobile-unity copied to clipboard
After upgrade to GMA 7.1.0 got many signal 6 (SIGABRT), code -1 (SI_QUEUE) crashes
[REQUIRED] Step 1: Describe your environment
- Unity version: 2020.3.36f1
- Google Mobile Ads Unity plugin version: 7.1.0
- Platform: Android
- Platform OS version: Android 12, Android 11, Android 10, Android 9, Android 8, Android 7, Android 6, Android 5.1, Android 5
- Any specific devices issue occurs on: No
- Mediation ad networks used, and their versions: 1. AdColony 2.6.0 2. Applovin 6.3.0 3. UnityAds 3.2.1
[REQUIRED] Step 2: Describe the problem
After upgrade to GMA 7.1.0 (and adding Applovin) got many crashes in Android Vitals:
backtrace:
#00 pc 000000000005f356 /apex/com.android.runtime/lib/bionic/libc.so (abort+166)
#00 pc 0000000000376499 /apex/com.android.runtime/lib/libart.so (art::Runtime::Abort(char const*)+1676)
#00 pc 000000000000855f /system/lib/libbase.so (android::base::LogMessage::~LogMessage()+406)
#00 pc 0000000000288adb /apex/com.android.runtime/lib/libart.so (art::JavaVMExt::AddGlobalRef(art::Thread*, art::ObjPtr<art::mirror::Object>)+202)
#00 pc 0000000000292a29 /apex/com.android.runtime/lib/libart.so (art::JNI::NewGlobalRef(_JNIEnv*, _jobject*)+428)
#00 pc 00000000000dff23 /system/lib/libandroid_runtime.so (JavaDeathRecipient::JavaDeathRecipient(_JNIEnv*, _jobject*, android::sp<DeathRecipientList> const&)+90)
#00 pc 00000000000dfc41 /system/lib/libandroid_runtime.so (android_os_BinderProxy_linkToDeath(_JNIEnv*, _jobject*, _jobject*, int)+96)
#00 pc 0000000000a96b19 /system/framework/arm/boot-framework.oat (art_jni_trampoline+96)
#00 pc 0000000001eeef61 /system/framework/arm/boot-framework.oat (miui.mqsas.sdk.MQSEventManagerDelegate.getMQSService+376)
#00 pc 0000000001eeea0f /system/framework/arm/boot-framework.oat (miui.mqsas.sdk.MQSEventManagerDelegate.checkDumpForJavaException+246)
#00 pc 0000000001eed679 /system/framework/arm/boot-framework.oat (miui.mqsas.oom.OOMEventManager.checkEventAndDumpIfNeeded+320)
#00 pc 0000000001d97297 /system/framework/arm/boot-framework.oat (com.android.internal.os.RuntimeInitInjector.onJE+430)
#00 pc 0000000001d9512f /system/framework/arm/boot-framework.oat (com.android.internal.os.RuntimeInit$LoggingHandler.uncaughtException+1478)
#00 pc 0000000000432e57 /system/framework/arm/boot.oat (java.lang.Thread.dispatchUncaughtException+94)
#00 pc 00000000000d7bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68)
#00 pc 000000000042e457 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250)
#00 pc 00000000000dffb7 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174)
#00 pc 00000000003701f7 /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+54)
#00 pc 00000000003710e1 /apex/com.android.runtime/lib/libart.so (art::InvokeVirtualOrInterfaceWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+304)
#00 pc 00000000002a0739 /apex/com.android.runtime/lib/libart.so (art::JNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+480)
#00 pc 00000000001d6931 /apex/com.android.runtime/lib/libart.so (_JNIEnv::CallVoidMethod(_jobject*, _jmethodID*, ...)+28)
#00 pc 00000000003ac72f /apex/com.android.runtime/lib/libart.so (art::Thread::HandleUncaughtExceptions(art::ScopedObjectAccessAlreadyRunnable&)+266)
#00 pc 00000000003abdf9 /apex/com.android.runtime/lib/libart.so (art::Thread::Destroy()+1104)
#00 pc 00000000003bb11b /apex/com.android.runtime/lib/libart.so (art::ThreadList::Unregister(art::Thread*)+102)
#00 pc 0000000000375c71 /apex/com.android.runtime/lib/libart.so (art::Runtime::DetachCurrentThread()+96)
#00 pc 000000000028c7e9 /apex/com.android.runtime/lib/libart.so (art::JII::DetachCurrentThread(_JavaVM*)+28)
#00 pc 0000000000082921 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+700)
#00 pc 0000000000002307 /system/bin/app_process32 (main+706)
#00 pc 0000000000059999 /apex/com.android.runtime/lib/bionic/libc.so (__libc_init+68)
#00 pc 000000000000202f /system/bin/app_process32 (_start_main+38)
#00 pc 0000000000004456 <anonymous>
backtrace:
#00 pc 00000000000705ac /apex/com.android.runtime/lib64/bionic/libc.so (abort+160)
#00 pc 00000000004cf318 /apex/com.android.runtime/lib64/libart.so (art::Runtime::Abort(char const*)+2512)
#00 pc 000000000000c5b4 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+608)
#00 pc 0000000000383ca4 /apex/com.android.runtime/lib64/libart.so (art::JavaVMExt::AddGlobalRef(art::Thread*, art::ObjPtr<art::mirror::Object>)+296)
#00 pc 0000000000390ec4 /apex/com.android.runtime/lib64/libart.so (art::JNI::NewGlobalRef(_JNIEnv*, _jobject*)+592)
#00 pc 0000000001d1809c /system/product/app/WebViewGoogle/WebViewGoogle.apk!libmonochrome.so (offset 0x162000)
And this I see in Unity Cloud Diagnostics:
Native Crash - Unknown Function (/apex/com.android.runtime/lib/bionic/libc.so)
Thread 0 (crashed)
0 libc.so 0x00000000ed3fc356 <symbols missing for uuid: af31ec96b35fedca378e07659b30896c>
1 libart.so 0x00000000ed1d8499 <symbols missing for uuid: 04997b3570c346f812675714d1681c80>
2 libbase.so 0x00000000f061655f <symbols missing for uuid: a28585ee446ea17e3e6fcf9c907fff2a>
3 libart.so 0x00000000ed0eaadb <symbols missing for uuid: 04997b3570c346f812675714d1681c80>
4 libart.so 0x00000000ed0f4a29 <symbols missing for uuid: 04997b3570c346f812675714d1681c80>
5 libunity.so 0x00000000c3bbde83 jni::NewGlobalRef(_jobject*)
Android 9 and below:
Native Crash - Unknown Function (/system/lib/libc.so)
Native Crash - Unknown Function (/system/lib64/libc.so)
This should be fixed as soon as possible!
I have the same issue. The difference is only in mediated networks. Everything else is the same. Also most of the time error happens when "ApplicationQuit" happens.
Related to #2137 ?
I think it is the same.
Related to #2137 ?
I think it is the same.
Oh nice, these problems are from June and no fix yet. Google as always...
Try to rollback to Unity 2020.3.34f1
I managed to reproduce the crash/anr on a test device and got some interesting logs about a JNI global reference overflow error coming from unity engine. It looks like the crash report generated by that issues are the same as those posted in this issue. Might it be that we are collectively looking at a Unity bug instead of a Mobile SDK one?
The update is posted under the original issue I opened earlier this week.
@adbourdages
Might it be that we are collectively looking at a Unity bug instead of a Mobile SDK one?
Maybe, I've looked at the trace logs and I am not convinced it came from GoogleMobileAds. The 5 libunity.so 0x00000000c3bbde83 jni::NewGlobalRef(_jobject*) trace into the missing symbols seems to suggest that.
I have logged this issue internally, but I am not sure what the root cause / cure of this issue is.
@NVentimiglia Hi,
We are having the exact same issue with AdMob 7.1.0 and Unity 2021.3.5f1. I can confirm that the issue started only after we added the AdMob SDK. A previous application with Unity 2021.3.5f1 and without the AdMob SDK did not have the crash.
Here is the stack trace:
backtrace:
#00 pc 00000000000705ac /apex/com.android.runtime/lib64/bionic/libc.so (abort+160)
#00 pc 00000000004cf318 /apex/com.android.runtime/lib64/libart.so (art::Runtime::Abort(char const*)+2512)
#00 pc 000000000000c5b4 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+608)
#00 pc 0000000000383ca4 /apex/com.android.runtime/lib64/libart.so (art::JavaVMExt::AddGlobalRef(art::Thread*, art::ObjPtr<art::mirror::Object>)+296)
#00 pc 0000000000390ec4 /apex/com.android.runtime/lib64/libart.so (art::JNI::NewGlobalRef(_JNIEnv*, _jobject*)+592)
#00 pc 000000000386f424 /data/app/com.google.android.webview-Yiag6fXVnu0_EIQ1CKc4DQ==/base.apk!libmonochrome.so (offset 0x48b000)
Sample device details: Model: Huawei HONOR 10i Android Version: Android 10 (SDK 29)
Same here.
Crashes and ANRs increased by 85% after the v7.1.0 update. I downgraded the version to v7.0.2 but got the same error mentioned here #2090
Unity versions I've tried: -Unity 2020.3.33f1 -Unity 2020.3.34f1
-AdMob 7.1.0 Medation adapters:
-
Meta Audience 3.8.0
-
AppLovin 6.3.1
-
Unity Ads 3.2.1 -> too many crahses and anrs
-
AdMob 7.0.2 Medation adapters:
-
Meta Audience 3.8.0
-
AppLovin 6.3.0
-
Unity Ads 3.2.1 and 3.2.0 -> #2090 issue occured I also tried changing the GoogleMobileAdsDependencies.xml file as follows:
<androidPackage spec="com.google.android.gms:play-services-ads:20.6.0">
by
<androidPackage spec="com.google.android.gms:play-services-ads:[20.6.0]">
However, nothing has changed. I don't know how to get rid of all these crashes anymore.
Has anyone found a solution?
@tomurtogu : are you locked to 3.33+ or can you downgrade to a version from early May?
Also, do you know if your crashes happen in long play sessions or early? If it is early it might not be related to the Unity version I just mentioned. If it is only on long play session then there is a good chance it is Unity.
@adbourdages
I can downgrade to a Unity version that will fix the problem, if any.
I had a stable version built with 2020.3.33f1 and Admob 7.0.0 on the Google Play Store (released on April). I upgraded to Unity 2020.3.34f1 and Admob 7.1 in July. After that, crashes increased and the downloads dramatically dropped.
I tried reverting to the same setup. I downgraded Unity to 2020.33f1, tried the above combinations...
I don't know exactly at which stage it crashes, as I havn't been able to reproduce the issue on any of my devices. However, the logs are similar on both the user devices and the pre-launch report.
Here is how I managed to reproduce the issue and be able to assert whether a specific setup was crashing or not
- find a good series to watch on netflix (critical :-))
- loaded the game up on a phone and using as many fingers as you can cram on the screen: constantly tap and drag
It takes about 15 minutes to crash the game that way. That's assuming we are talking about the same crash of course. There might be more than one crash with the same signature, so who knows. After crashing, the logcat shows that it comes from JNI global reference table overflow due to MotionEvent not getting released.
It is possible to reproduce that crash with a minimal project (just a ugui button and a couple of text labels). So if it is the same, it ought to happen independently of the other libraries you added.
There is more detail in another thread
Thank you :)
There are so many kinds of crashes than I've ever seen before. Many of Unity's libraries seem to be crashing. Also there are crashes/anr related to medaiton adapters. I am also using the old input system. So it's possible that there is a similar issue. I'll give it a try.
In this thread Unity claimed that they will release a fix on August 10. So maybe :/
Here are example logs of my crashes :
Exception java.lang.Error: FATAL EXCEPTION [UnityMain]
Unity version : 2020.3.34f1
Device model : Hisense Hisense E40 Lite
Device fingerprint: Hisense/HLTE223E_40/SC9863A:9/PPR1.180610.011/Hisense_HLTE223E_51_S02:user/release-keys
Build Type : Release
Scripting Backend : IL2CPP
ABI : arm64-v8a
Strip Engine Code : true
Caused by: java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2020.3.34f1 (9a4c9c70452b)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
Build fingerprint: 'Hisense/HLTE223E_40/SC9863A:9/PPR1.180610.011/Hisense_HLTE223E_51_S02:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2022-07-30 15:20:59+0200
pid: 14442, tid: 14509, name: UnityMain >>> com.vo.pack <<<
uid: 10142
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x79d639cff0
x0 00000079d639d050 x1 00000079d639d180 x2 0000000000000000 x3 00000079d6ba9b78
x4 00000079d639d110 x5 0000000000000000 x6 0000000000000000 x7 0000000000000027
x8 00000079d639d020 x9 0000000000000000 x10 00000079700a0840 x11 0000000000000020
x12 0000000000000000 x13 0000000000000000 x14 0000007950da92a0 x15 0000007950daa4a0
x16 00000079d93e51e0 x17 0000007a7a45dff0 x18 0000000000000001 x19 00000079d639d050
x20 00000079d639d180 x21 0000000000000000 x22 0000000000000000 x23 0000000000000001
x24 0000000000000018 x25 0000000000000001 x26 0000000000000000 x27 0000000000000000
x28 00000079d9412278 x29 00000079d639d5c0
sp 00000079d639cfe0 lr 00000079d86e5958 pc 00000079d86e59ec
backtrace:
#00 pc 00000000003059ec /mnt/expand/901663b2-bdd6-414b-a111-318354094781/app/com.vo.pack-mpJzSZfpP-r1CASxMd4xiw==/lib/arm64/libunity.so (BuildId: 697243dd45237b139ee86d6567c993a1f3a02044)
#01 pc 0000000000305954 /mnt/expand/901663b2-bdd6-414b-a111-318354094781/app/com.vo.pack-mpJzSZfpP-r1CASxMd4xiw==/lib/arm64/libunity.so (BuildId: 697243dd45237b139ee86d6567c993a1f3a02044)
at libunity.0x3059ec(Native Method)
at libunity
Another one:
JNI FatalError called: Unable to load library: / data / app / com.vo.pack - SGhvCUT83ywgUz7dz2xrMg ==/ lib / arm64 / libunity.so[dlopen failed: "/data/app/com.vo.pack-SGhvCUT83ywgUz7dz2xrMg==/lib/arm64/libunity.so".dynamic section header was not found]:
#00 pc 0x00000000000831f0 /apex/com.android.runtime/lib64/bionic/libc.so (abort)
#00 pc 0x00000000004b9e5c /apex/com.android.runtime/lib64/libart.so (art::Runtime::Abort(char const*))
#00 pc 0x000000000000b458 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage())
#00 pc 0x0000000000385d94 /apex/com.android.runtime/lib64/libart.so (art::JNI::FatalError(_JNIEnv*, char const*))
#00 pc 0x0000000000000c6c /data/app/com.vo.pack-SGhvCUT83ywgUz7dz2xrMg==/lib/arm64/libmain.so
#00 pc 0x0000000000000a44 /data/app/com.vo.pack-SGhvCUT83ywgUz7dz2xrMg==/lib/arm64/libmain.so
#00 pc 0x000000000003cf4c /data/app/com.vo.pack-SGhvCUT83ywgUz7dz2xrMg==/oat/arm64/base.odex (art_jni_trampoline)
#00 pc 0x00000000001375b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub)
#00 pc 0x000000000014600c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*))
#00 pc 0x00000000002e3800 /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*))
#00 pc 0x00000000002dea60 /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*))
#00 pc 0x00000000005a4290 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic)
#00 pc 0x0000000000131994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static)
#00 pc 0x0000000000840280 /data/app/com.vo.pack-SGhvCUT83ywgUz7dz2xrMg==/oat/arm64/base.vdex (com.unity3d.player.UnityPlayer.loadNative)
#00 pc 0x00000000005a452c /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic)
#00 pc 0x0000000000131994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static)
#00 pc 0x00000000008404d6 /data/app/com.vo.pack-SGhvCUT83ywgUz7dz2xrMg==/oat/arm64/base.vdex (com.unity3d.player.UnityPlayer.<init>)
#00 pc 0x00000000005a3d88 /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect)
#00 pc 0x0000000000131914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct)
#00 pc 0x000000000083f500 /data/app/com.vo.pack-SGhvCUT83ywgUz7dz2xrMg==/oat/arm64/base.vdex (com.unity3d.player.UnityPlayerActivity.onCreate)
#00 pc 0x00000000002b4b14 /apex/com.android.runtime/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.10247671929900336896))
#00 pc 0x0000000000592d24 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge)
#00 pc 0x0000000000140468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge)
#00 pc 0x0000000001318e80 /system/framework/arm64/boot-framework.oat (android.app.Activity.performCreate)
#00 pc 0x000000000091bb80 /system/framework/arm64/boot-framework.oat (android.app.Instrumentation.callActivityOnCreate)
#00 pc 0x0000000000ca7f08 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.performLaunchActivity)
#00 pc 0x0000000000cafb60 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.handleLaunchActivity)
#00 pc 0x000000000134c088 /system/framework/arm64/boot-framework.oat (android.app.servertransaction.LaunchActivityItem.execute)
#00 pc 0x00000000009a1620 /system/framework/arm64/boot-framework.oat (android.app.servertransaction.TransactionExecutor.executeCallbacks)
#00 pc 0x00000000009a1374 /system/framework/arm64/boot-framework.oat (android.app.servertransaction.TransactionExecutor.execute)
#00 pc 0x0000000000c90468 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread$H.handleMessage)
#00 pc 0x000000000167ec84 /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage)
#00 pc 0x00000000016880e4 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop)
#00 pc 0x0000000000ca6894 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main)
#00 pc 0x00000000001375b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub)
#00 pc 0x000000000014600c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*))
#00 pc 0x00000000004b171c /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*))
#00 pc 0x00000000004b32c0 /apex/com.android.runtime/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long))
#00 pc 0x000000000043e558 /apex/com.android.runtime/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*))
#00 pc 0x00000000006d4ea4 /system/framework/arm64/boot.oat (art_jni_trampoline)
#00 pc 0x0000000002305678 /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run)
#00 pc 0x0000000002325e64 /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main)
#00 pc 0x00000000001375b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub)
#00 pc 0x000000000014600c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*))
#00 pc 0x00000000004b171c /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*))
#00 pc 0x00000000004b130c /apex/com.android.runtime/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list))
#00 pc 0x00000000003bb6b4 /apex/com.android.runtime/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list))
#00 pc 0x00000000000c19ec /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...))
#00 pc 0x00000000000c49b0 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool))
#00 pc 0x00000000000035bc /system/bin/app_process64 (main)
#00 pc 0x000000000007e978 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init)
Unity just released a new version 2021.3.8f1 with a potential fix for the MotionEvent bug: https://issuetracker.unity3d.com/issues/android-crash-in-player-due-to-an-overflow-of-global-references-to-android-dot-view-dot-motionevent