For the past few days I’ve been using admin banner ads without any problem. All of a sudden though on android devices it’s been giving a java.lang.nullpointerexception error. After debugging it ONLY happens when the line of code ads.show(“banner”, {x=0, y=0}) is written. Without the line the app works perfectly fine. However when it is there the app gives a black screen and says java.lang.nullpointerexception on startup
Same here, I see this happen on Android but not on iOS.
In my case, it seems to happen when I do an ads.hide(), call an overlay, then hide the overlay, then do an ads.show() back on the original scene.
I/Corona (13860): Runtime error I/Corona (13860): java.lang.NullPointerException I/Corona (13860): Java Stack Trace: I/Corona (13860): com.naef.jnlua.LuaState.getArgTypeException(Unknown Source) I/Corona (13860): com.naef.jnlua.LuaState.checkString(Unknown Source) I/Corona (13860): CoronaProvider.ads.admob.LuaLoader.show(LuaLoader.java:199) I/Corona (13860): CoronaProvider.ads.admob.LuaLoader$ShowWrapper.invoke(LuaLoader.java:191) I/Corona (13860): com.ansca.corona.JavaToNativeShim.nativeRender(Native Method) I/Corona (13860): com.ansca.corona.JavaToNativeShim.render(JavaToNativeShim.java:163) I/Corona (13860): com.ansca.corona.Controller.updateRuntimeState(Controller.java:234) I/Corona (13860): com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:402) I/Corona (13860): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1622) I/Corona (13860): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377) I/Corona (13860): stack traceback: I/Corona (13860): [C]: ? I/Corona (13860): [C]: in function 'show' I/Corona (13860): ?: in function \<?:146\> I/Corona (13860): ?: in function 'dispatchEvent' I/Corona (13860): ?: in function '?' I/Corona (13860): ?: in function \<?:1220\> I/Corona (13860): (tail call): ? I/Corona (13860): ?: in function \<?:466\> I/Corona (13860): ?: in function \<?:218\> I/Corona (13860): Runtime error I/Corona (13860): I/Corona (13860): stack traceback: I/Corona (13860): [C]: ? I/Corona (13860): [C]: in function 'show' I/Corona (13860): ?: in function \<?:146\> I/Corona (13860): ?: in function 'dispatchEvent' I/Corona (13860): ?: in function '?' I/Corona (13860): ?: in function \<?:1220\> I/Corona (13860): (tail call): ? I/Corona (13860): ?: in function \<?:466\> I/Corona (13860): ?: in function \<?:218\>
Okay never mind, in my case it happens when I call an ads.show() without any arguments passed… Putting in the “banner” and the x-y coordinates fixed it.
Same here, I see this happen on Android but not on iOS.
In my case, it seems to happen when I do an ads.hide(), call an overlay, then hide the overlay, then do an ads.show() back on the original scene.
I/Corona (13860): Runtime error I/Corona (13860): java.lang.NullPointerException I/Corona (13860): Java Stack Trace: I/Corona (13860): com.naef.jnlua.LuaState.getArgTypeException(Unknown Source) I/Corona (13860): com.naef.jnlua.LuaState.checkString(Unknown Source) I/Corona (13860): CoronaProvider.ads.admob.LuaLoader.show(LuaLoader.java:199) I/Corona (13860): CoronaProvider.ads.admob.LuaLoader$ShowWrapper.invoke(LuaLoader.java:191) I/Corona (13860): com.ansca.corona.JavaToNativeShim.nativeRender(Native Method) I/Corona (13860): com.ansca.corona.JavaToNativeShim.render(JavaToNativeShim.java:163) I/Corona (13860): com.ansca.corona.Controller.updateRuntimeState(Controller.java:234) I/Corona (13860): com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:402) I/Corona (13860): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1622) I/Corona (13860): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377) I/Corona (13860): stack traceback: I/Corona (13860): [C]: ? I/Corona (13860): [C]: in function 'show' I/Corona (13860): ?: in function \<?:146\> I/Corona (13860): ?: in function 'dispatchEvent' I/Corona (13860): ?: in function '?' I/Corona (13860): ?: in function \<?:1220\> I/Corona (13860): (tail call): ? I/Corona (13860): ?: in function \<?:466\> I/Corona (13860): ?: in function \<?:218\> I/Corona (13860): Runtime error I/Corona (13860): I/Corona (13860): stack traceback: I/Corona (13860): [C]: ? I/Corona (13860): [C]: in function 'show' I/Corona (13860): ?: in function \<?:146\> I/Corona (13860): ?: in function 'dispatchEvent' I/Corona (13860): ?: in function '?' I/Corona (13860): ?: in function \<?:1220\> I/Corona (13860): (tail call): ? I/Corona (13860): ?: in function \<?:466\> I/Corona (13860): ?: in function \<?:218\>
Okay never mind, in my case it happens when I call an ads.show() without any arguments passed… Putting in the “banner” and the x-y coordinates fixed it.