NullPointer from com.unity3d.ads.adunit.AdUnitActivity/AdUnitSoftwareActivity

Hi,

Any input on this crash? It happens very rarely (got 20 reported crashes due to this out of 20k+ active users). Thanks

Android versions
so far 2.3.3 → 5.1

SDK vers
2.0.2 (release)

In the constructor
UnityAds.initialize(this, UNITY_ID, unityListener);

Calling ad
if(isReady()) show(this, “defaultZone”);

Calling rewarded ad
if(isReady()) show(this, “rewardedVideoZone”);

Full stack trace
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.frojo.moy5/com.unity3d.ads.adunit.AdUnitActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.unity3d.ads.adunit.AdUnitActivity.onCreate(AdUnitActivity.java:89)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
… 11 more

Hello,

I believe that this is a rare edge case that might happen when app is in background, app process is killed and then user returns to app. This edge case will be fixed in the next release, likely released this week.

Janne, Unity Ads SDK team