googleads / googleads-mobile-unity

Official Unity Plugin for the Google Mobile Ads SDK
https://developers.google.com/admob/unity
Apache License 2.0
1.36k stars 1.08k forks source link

Unity App crashes after RewardedBasedVideo.run is called #771

Closed Mecze closed 5 years ago

Mecze commented 5 years ago

Hi, This is a weird crash being reported to us through Fabric.

Our players are suffering "signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)" Crashes:

Caused by java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000000e0
 Build fingerprint: '<redacted>'
 Revision: '0'
 pid: 18419, tid: 18718, name: Thread-59  

As you can see: name: Thread-59 refers to an specific thread.

Sadly, we've got no output error from that thread, but we've got last calls on that thread before the crash: Thread-59:

 Thread-59
        at com.unity3d.player.ReflectionHelper.nativeProxyInvoke(Unknown Source)
        at com.unity3d.player.ReflectionHelper.a(Unknown Source)
        at com.unity3d.player.ReflectionHelper$1.invoke(Unknown Source)
        at java.lang.reflect.Proxy.invoke(Proxy.java:813)
        at $Proxy8.onAdLoaded(Unknown Source)
        at com.google.unity.ads.RewardBasedVideo$1$1$1.run(RewardBasedVideo.java:75)
        at java.lang.Thread.run(Thread.java:761)

(This is being reported the same on all crashes with this trace.) Something is being called at RewardBasedVideo.java:75 which triggers the crash.

We are using:

Admob for Unity -> version 3.15.1
Unity version -> 2017.4.3f1

Also using (might be relevant, or not) UnityAds Mediation -> version 1.2.0
Applovin Mediation -> version 8.1 UnityAds SDK (downloaded through play services resolver) -> version 2.3.0
UnityIAP 1.20.0

Being built as Gradle, with Proguard (proguard exception are all ok!)

We cannot reproduce this error, which makes it VERY hard to resolve. I've been looking around for why this happens and cannot find any explanation. Do anybody knows what's going on?

Ruco commented 5 years ago

We're having the same / a similar issue. It is being reported (and tested with 100% reproducibility by us), that when a rewarded video Ad is being watched. When the video has finished playing. Our app crashes. Weirdly enough I am unable to find anything in logcat (will update once I have tested with a debug build in case that provides me with more info). But we get many many crashes reported in the Play Console:

java.lang.RuntimeException: at android.app.ActivityThread.handleReceiver (ActivityThread.java:2724) at android.app.ActivityThread.access$1800 (ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1433) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:148) at android.app.ActivityThread.main (ActivityThread.java:5551) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:730) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:620)

Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass (ClassLoader.java:511) at java.lang.ClassLoader.loadClass (ClassLoader.java:469) at android.app.ActivityThread.handleReceiver (ActivityThread.java:2719)

Really hope someone is able to help with this issue soon. Luckily we've only done a partial rollout. But it's still impacting a lot of our users. And we're unable to rollout any further until this is resolved (obviously).

When running a development build I was able to extract some more info from logcat:

java.lang.AbstractMethodError: abstract method "void com.google.android.gms.ads.reward.RewardedVideoAdListener.onRewardedVideoCompleted()" at com.google.android.gms.internal.ads.zzahj.onRewardedVideoCompleted(Unknown Source:6) at com.google.android.gms.internal.ads.zzahf.dispatchTransaction(Unknown Source:67) at com.google.android.gms.internal.ads.zzek.onTransact(Unknown Source:22) at android.os.Binder.transact(Binder.java:604) at mz.b(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):19) at com.google.android.gms.ads.internal.reward.client.n.e(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):24) at com.google.android.gms.ads.internal.a.h(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):170) at com.google.android.gms.ads.internal.reward.e.m_(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):101) at com.google.android.gms.ads.internal.reward.mediation.h.g(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):37) at com.google.android.gms.ads.internal.reward.client.p.e(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):81) at com.google.android.gms.ads.internal.a.h(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):170) at com.google.android.gms.ads.internal.aj.X(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):169) at com.google.android.gms.ads.internal.gmsg.al.a(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):9) at com.google.android.gms.ads.internal.webview.j.b(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):90) at com.google.android.gms.ads.internal.webview.ac.run(Unknown Source:8) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at com.google.android.gms.ads.internal.util.f.dispatchMessage(:com.google.android.gms.dynamite_adsdynamite@13280051@13.2.80 (040408-211705629):3) at android.os.Looper.loop(Looper.java:169) at android.app.ActivityThread.main(ActivityThread.java:6595) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

rampara commented 5 years ago

@Mecze @Ruco As this issue is not related to a bug in this plugin or a feature request, I would recommend you reach out on the Google Mobile Ads Technical Support Forum for further support.