FAN crash error when exiting app (Android)

Saw this error when trying to exit Android app using FAN plugin.

05-19 13:13:43.155: E/AndroidRuntime(11914): FATAL EXCEPTION: main 05-19 13:13:43.155: E/AndroidRuntime(11914): Process: com.easy.test PID: 11914 05-19 13:13:43.155: E/AndroidRuntime(11914): java.lang.RuntimeException: Unable to destroy activity {com.easy.atr/com.ansca.corona.CoronaActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Set java.util.Map.entrySet()' on a null object reference 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3791) 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3809) 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.app.ActivityThread.access$1400(ActivityThread.java:155) 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371) 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.os.Handler.dispatchMessage(Handler.java:102) 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.os.Looper.loop(Looper.java:135) 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.app.ActivityThread.main(ActivityThread.java:5343) 05-19 13:13:43.155: E/AndroidRuntime(11914): at java.lang.reflect.Method.invoke(Native Method) 05-19 13:13:43.155: E/AndroidRuntime(11914): at java.lang.reflect.Method.invoke(Method.java:372) 05-19 13:13:43.155: E/AndroidRuntime(11914): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) 05-19 13:13:43.155: E/AndroidRuntime(11914): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) 05-19 13:13:43.155: E/AndroidRuntime(11914): Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Set java.util.Map.entrySet()' on a null object reference 05-19 13:13:43.155: E/AndroidRuntime(11914): at plugin.fbAudienceNetwork.LuaLoader.removeInterstitialAds(LuaLoader.java:534) 05-19 13:13:43.155: E/AndroidRuntime(11914): at plugin.fbAudienceNetwork.LuaLoader.onExiting(LuaLoader.java:1567) 05-19 13:13:43.155: E/AndroidRuntime(11914): at com.ansca.corona.CoronaEnvironment$RuntimeEventHandler.onExiting(CoronaEnvironment.java:521) 05-19 13:13:43.155: E/AndroidRuntime(11914): at com.ansca.corona.CoronaRuntime.onExiting(CoronaRuntime.java:430) 05-19 13:13:43.155: E/AndroidRuntime(11914): at com.ansca.corona.CoronaRuntime.dispose(CoronaRuntime.java:76) 05-19 13:13:43.155: E/AndroidRuntime(11914): at com.ansca.corona.CoronaActivity.onDestroy(CoronaActivity.java:1505) 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.app.Activity.performDestroy(Activity.java:6189) 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1164) 05-19 13:13:43.155: E/AndroidRuntime(11914): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3778) 05-19 13:13:43.155: E/AndroidRuntime(11914): ... 10 more

Was there an interstitial ad showing at the time?

Can you produce a test case that reproduces the problem?
 

Rob

No.  Did not show any interstitial. In fact, I did not even initialise the plugin and show FAN ads, though I included it in the app.  There was also another error shown but I do not have the test case as it submitted as a crash report by my user.  This is for another of my apps which has FAN ads in it.

java.lang.ClassCastException: com.facebook.ads.InterstitialAd cannot be cast to plugin.fbAudienceNetwork.LuaLoader$BannerAdView at plugin.fbAudienceNetwork.LuaLoader$BannerAdView.onSizeChanged(LuaLoader.java:342) at android.view.View.sizeChange(View.java:15717) at android.view.View.setFrame(View.java:15690) at android.view.View.layout(View.java:15606) at android.view.ViewGroup.layout(ViewGroup.java:4967) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573) at android.widget.FrameLayout.onLayout(FrameLayout.java:508) at android.view.View.layout(View.java:15610) at android.view.ViewGroup.layout(ViewGroup.java:4967) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573) at android.widget.FrameLayout.onLayout(FrameLayout.java:508) at android.view.View.layout(View.java:15610) at android.view.ViewGroup.layout(ViewGroup.java:4967) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573) at android.widget.FrameLayout.onLayout(FrameLayout.java:508) at android.view.View.layout(View.java:15610) at android.view.ViewGroup.layout(ViewGroup.java:4967) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557) at android.widget.LinearLayout.onLayout(LinearLayout.java:1466) at android.view.View.layout(View.java:15610) at android.view.ViewGroup.layout(ViewGroup.java:4967) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573) at android.widget.FrameLayout.onLayout(FrameLayout.java:508) at android.view.View.layout(View.java:15610) at android.view.ViewGroup.layout(ViewGroup.java:4967) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2099) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1856) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1081) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5818) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:769) at android.view.Choreographer.doCallbacks(Choreographer.java:582) at android.view.Choreographer.doFrame(Choreographer.java:552) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:755) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5234) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)

Looking into this. 

Thanks

Hey Falcon.

A fix for this issue has been pushed up.

The fix should be available in 1~2 hours from the time of this post.

Just rebuild after that timeframe and let me know how you get on please.

Thank you