Admob Plugin Banner Display Runtime Error

Hello,

This happens sometimes, not all the time. It happens when load banner is called.

[lua]I/Corona ( 3010): – ads - loadAdmob() banner
I/Corona ( 3010): ERROR: Runtime error
I/Corona ( 3010): java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.Boolean.booleanValue()’ on a null object reference
I/Corona ( 3010): Java Stack Trace:
I/Corona ( 3010): plugin.admob.LuaLoader$Load.invoke(LuaLoader.java:753)
I/Corona ( 3010): com.ansca.corona.JavaToNativeShim.nativeResize(Native Method)
I/Corona ( 3010): com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:381)
I/Corona ( 3010): com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:378)
I/Corona ( 3010): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1612)
I/Corona ( 3010): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1378)
I/Corona ( 3010): stack traceback:
I/Corona ( 3010): [C]: in function ‘load’
I/Corona ( 3010): ?: in function ‘loadAdmob’
I/Corona ( 3010): ?: in function
I/Corona ( 3010): ?: in function ‘loadBanner’
I/Corona ( 3010): ?: in function ‘loadAds’
I/Corona ( 3010): ?: in function ‘method’
I/Corona ( 3010): /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:221: in function ‘dispatchEvent’
I/Corona ( 3010): /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/co
I/Corona ( 3010): Handling the unhandled error java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.Boolean.booleanValue()’ on a null object reference
I/Corona ( 3010): Java Stack Trace:
I/Corona ( 3010): plugin.admob.LuaLoader$Load.invoke(LuaLoader.java:753)
I/Corona ( 3010): com.ansca.corona.JavaToNativeShim.nativeResize(Native Method)
I/Corona ( 3010): com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:381)
I/Corona ( 3010): com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:378)
I/Corona ( 3010): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1612)
I/Corona ( 3010): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1378)
I/Corona ( 3010): ERROR: Runtime error
I/Corona ( 3010): java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValueI/Corona ( 3010): java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.Boolean.booleanValue()’ on a null object reference
I/Corona ( 3010): Java Stack Trace:
I/Corona ( 3010): plugin.admob.LuaLoader$Load.invoke(LuaLoader.java:753)
I/Corona ( 3010): com.ansca.corona.JavaToNativeShim.nativeResize(Native Method)
I/Corona ( 3010): com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:381)
I/Corona ( 3010): com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:378)
I/Corona ( 3010): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1612)
I/Corona ( 3010): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1378)
I/Corona ( 3010): stack traceback:
I/Corona ( 3010): [C]: ?
I/Corona ( 3010): [C]: in function ‘load’
I/Corona ( 3010): ?: in function ‘loadAdmob’
I/Corona ( 3010): ?: in function
I/Corona ( 3010): ?: in function ‘loadBanner’
I/Corona ( 3010): ?: in function ‘loadAds’
I/Corona ( 3010): ?: in function ‘method’
I/Corona ( 3010): /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:221: in function ‘dispatchEvent’
I/Corona ( 3010): /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/composer/composer.lua:886: in function
I/Corona ( 3010): (tail call): ?
I/Corona ( 3010): /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/transition/transition.lua:599: in function ‘method’
I/Corona ( 3010): /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:221: in function
I/Corona ( 3010): Handling the unhandled error java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.Boolean.booleanValue()’ on a null object reference[/lua]

Best

Bulent

Hi @bulupe,

Can you please provide some code for how/when you’re loading the banner? I’d like to inspect a bit further and that will help us diagnose.

Thanks,

Brent

@bulupe

I’m trying to isolate the issue, however I’m having difficulty seeing how this can happen.

Is this something you have been able to replicate yourself, or is it reported by users of your app?

@bulupe

Are you waiting for the ‘init’ event before calling admob.load() ?

@ingemar

It seems I was not waiting for init, thank you.

I will let you know if it still happens.

Hi @bulupe,

Can you please provide some code for how/when you’re loading the banner? I’d like to inspect a bit further and that will help us diagnose.

Thanks,

Brent

@bulupe

I’m trying to isolate the issue, however I’m having difficulty seeing how this can happen.

Is this something you have been able to replicate yourself, or is it reported by users of your app?

@bulupe

Are you waiting for the ‘init’ event before calling admob.load() ?

@ingemar

It seems I was not waiting for init, thank you.

I will let you know if it still happens.