AppLovin crash on device test

I’m testing a few ad networks. Build 2830. When trying to run applovin the app crashes sometime after calling applovin init method before getting response event back not to mention pre-loading or requesting an ad:

E/AndroidRuntime( 8508): java.lang.RuntimeException: Unable to destroy activity {com.tiltangames.playwithdino/com.ansca.corona.CoronaActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Set java.util.Map.entrySet()' on a null object reference E/AndroidRuntime( 8508): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3881) E/AndroidRuntime( 8508): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3899) E/AndroidRuntime( 8508): at android.app.ActivityThread.access$1400(ActivityThread.java:169) E/AndroidRuntime( 8508): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475) E/AndroidRuntime( 8508): at android.os.Handler.dispatchMessage(Handler.java:111) E/AndroidRuntime( 8508): at android.os.Looper.loop(Looper.java:194) E/AndroidRuntime( 8508): at android.app.ActivityThread.main(ActivityThread.java:5549) E/AndroidRuntime( 8508): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 8508): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 8508): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964) E/AndroidRuntime( 8508): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759) E/AndroidRuntime( 8508): Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Set java.util.Map.entrySet()' on a null object reference E/AndroidRuntime( 8508): at plugin.applovin.LuaLoader.cleanupInterstitialAds(LuaLoader.java:680) E/AndroidRuntime( 8508): at plugin.applovin.LuaLoader.onExiting(LuaLoader.java:1244) E/AndroidRuntime( 8508): at com.ansca.corona.CoronaEnvironment$RuntimeEventHandler.onExiting(CoronaEnvironment.java:470) E/AndroidRuntime( 8508): at com.ansca.corona.CoronaRuntime.onExiting(CoronaRuntime.java:422) E/AndroidRuntime( 8508): at com.ansca.corona.CoronaRuntime.dispose(CoronaRuntime.java:76) E/AndroidRuntime( 8508): at com.ansca.corona.CoronaActivity.onDestroy(CoronaActivity.java:1302) E/AndroidRuntime( 8508): at android.app.Activity.performDestroy(Activity.java:6154) E/AndroidRuntime( 8508): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1147) E/AndroidRuntime( 8508): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3868) E/AndroidRuntime( 8508): ... 10 more

When activating verbose I get another error:

V/Corona (11109): \< Class.forName: plugin.applovin.LuaLoader V/Corona (11109): Loading via reflection: plugin.applovin.LuaLoader I/Corona (11109): init applovin W/System.err(11109): com.naef.jnlua.LuaRuntimeException: ?:0: attempt to index a nil value W/System.err(11109): at com.naef.jnlua.LuaState.lua\_pcall(Native Method) W/System.err(11109): at com.naef.jnlua.LuaState.call(Unknown Source) W/System.err(11109): at com.ansca.corona.CoronaLua.dispatchEvent(CoronaLua.java:100) W/System.err(11109): at network.NetworkRequest$LuaCallback$1.executeUsing(NetworkRequest.java:607) W/System.err(11109): at com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:148) W/System.err(11109): at com.ansca.corona.events.EventManager.sendEvents(EventManager.java:91) W/System.err(11109): at com.ansca.corona.Controller.updateRuntimeState(Controller.java:300) W/System.err(11109): at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:421) W/System.err(11109): at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1623) W/System.err(11109): at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1378)

The implementation is simple as indicated on the plug in doc:

applovin.init( adListener, { sdkKey=key, verboseLogging=false } )

nothing else happen for this plug in - no event response or whatever

Is that a bug or something is missing?

My suggestion:

Write a small test case, and submit this as a bug.  I’d also provide a link to the test case here so others can help look into this.

https://developer.coronalabs.com/content/bug-submission

Don’t supply your own AppLovin id(s).  Simply put dummy identifiers in the test case.

-Ed

@rune7,

I’ll be writing up a test bench of my own for AppLovin today or tomorrow (related to my GDT work).  I’ll post back when I get results either way.

@roaminggamer,

Appreciate your input on this. We will continue testing other plug-ins in the meantime as Applovin seems unstable for the time being.

@rune7,

Hi.  OK. I’ve written a test case and tried this out.  So far I’m not having any problems.

Here is a link to my super-basic test case:

http://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2016/03/ApplovinTest.zip

You’ll have to put your own SDK Key in of course.

Test Details

  • Test 1
    • Galaxy Tab 4
    • Corona SDK 2016.2841
    • Built from Windows 10 
    • Status: Success
  • Test 2
    •  iPad Air (Gen 1)
    • Corona SDK 2016.2841
    • Built for OS X 10.11.3 (El Capitan)
    • XCode 7.2.1 (7C1002)
    • Status:  Success

@rune7,

OK.  All good.  I’ve tested on Android and iOS w/ the latest Corona build and both work.  Please see my notes above and grab the test case if you need it / want to compare notes.  

@roaminggamer,

Thanks for letting us know. It must be something in our implementation, although ours seems the same. Perhaps its something not directly connected to the network code. We will investigate further.

My suggestion:

Write a small test case, and submit this as a bug.  I’d also provide a link to the test case here so others can help look into this.

https://developer.coronalabs.com/content/bug-submission

Don’t supply your own AppLovin id(s).  Simply put dummy identifiers in the test case.

-Ed

@rune7,

I’ll be writing up a test bench of my own for AppLovin today or tomorrow (related to my GDT work).  I’ll post back when I get results either way.

@roaminggamer,

Appreciate your input on this. We will continue testing other plug-ins in the meantime as Applovin seems unstable for the time being.

@rune7,

Hi.  OK. I’ve written a test case and tried this out.  So far I’m not having any problems.

Here is a link to my super-basic test case:

http://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2016/03/ApplovinTest.zip

You’ll have to put your own SDK Key in of course.

Test Details

  • Test 1
    • Galaxy Tab 4
    • Corona SDK 2016.2841
    • Built from Windows 10 
    • Status: Success
  • Test 2
    •  iPad Air (Gen 1)
    • Corona SDK 2016.2841
    • Built for OS X 10.11.3 (El Capitan)
    • XCode 7.2.1 (7C1002)
    • Status:  Success

@rune7,

OK.  All good.  I’ve tested on Android and iOS w/ the latest Corona build and both work.  Please see my notes above and grab the test case if you need it / want to compare notes.  

@roaminggamer,

Thanks for letting us know. It must be something in our implementation, although ours seems the same. Perhaps its something not directly connected to the network code. We will investigate further.