java.lang.NullPointerException

Can anyone help with this stack trace please?

java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.isEmpty()' on a null object reference Java Stack Trace: &nbsp;&nbsp;&nbsp;&nbsp;plugin.google.iap.v3.util.IabHelper.startSetup(IabHelper.java:272) &nbsp;&nbsp;&nbsp;&nbsp;plugin.google.iap.v3.LuaLoader.init(LuaLoader.java:159) &nbsp;&nbsp;&nbsp;&nbsp;plugin.google.iap.v3.LuaLoader.access$1200(LuaLoader.java:37) &nbsp;&nbsp;&nbsp;&nbsp;plugin.google.iap.v3.LuaLoader$InitWrapper.invoke(LuaLoader.java:445) &nbsp;&nbsp;&nbsp;&nbsp;com.ansca.corona.JavaToNativeShim.nativeRender(Native Method) &nbsp;&nbsp;&nbsp;&nbsp;com.ansca.corona.JavaToNativeShim.render(JavaToNativeShim.java:182) &nbsp;&nbsp;&nbsp;&nbsp;com.ansca.corona.Controller.updateRuntimeState(Controller.java:347) &nbsp;&nbsp;&nbsp;&nbsp;com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:421) &nbsp;&nbsp;&nbsp;&nbsp;com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1623) &nbsp;&nbsp;&nbsp;&nbsp;com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1378) stack traceback: &nbsp;&nbsp;&nbsp;&nbsp;[C]: in function 'init' &nbsp;&nbsp;&nbsp;&nbsp;?: in function 'init' &nbsp;&nbsp;&nbsp;&nbsp;?: in function 'listener' &nbsp;&nbsp;&nbsp;&nbsp;/Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/timer/timer.lua:198: in function 'method' &nbsp;&nbsp;&nbsp;&nbsp;/Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:213: in function \</Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:182\>

Also, I’m curious about this one… obviously it is an internal error on hiding a modal overlay but what is it’s cause?

?:0: attempt to index field 'view' (a nil value) stack traceback: ?: in function 'hideOverlay' ?: in function 'func' /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:195: in function \</Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:182\>

Hey Corona staff… seriously, no insight on this?  these are obviously native code errors.  I am using build 3040.

Can you give us a starting point? What are you doing that’s triggering them?

Rob

Wish I could Rob, this is what I see in my DB.  It could be related to https://forums.coronalabs.com/topic/61955-plugingoogleiapv3-is-not-supported-for-android-6/ - Perhaps it is Android emulators?

I’m more concerned about the second error

:0: attempt to index field 'view' (a nil value) stack traceback: ?: in function 'hideOverlay' ?: in function 'func'

as this is raised upon hiding scene loaded as an overlay.

If you’re running on an emulator, the lack of Google Play is likely generating the error.

The other error sounds like something’s removing the view when it’s still needed. Are you doing anything to remove the overlay before you hide it?

No all fairly straight forward scene management like this

local function closeButtonEvent( event ) if event.phase == "ended" then storyboard.hideOverlay("fade", 200) end return true end

Could it be on low memory conditions that the view is somehow removed?

Also, I’m curious about this one… obviously it is an internal error on hiding a modal overlay but what is it’s cause?

?:0: attempt to index field 'view' (a nil value) stack traceback: ?: in function 'hideOverlay' ?: in function 'func' /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:195: in function \</Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:182\>

Hey Corona staff… seriously, no insight on this?  these are obviously native code errors.  I am using build 3040.

Can you give us a starting point? What are you doing that’s triggering them?

Rob

Wish I could Rob, this is what I see in my DB.  It could be related to https://forums.coronalabs.com/topic/61955-plugingoogleiapv3-is-not-supported-for-android-6/ - Perhaps it is Android emulators?

I’m more concerned about the second error

:0: attempt to index field 'view' (a nil value) stack traceback: ?: in function 'hideOverlay' ?: in function 'func'

as this is raised upon hiding scene loaded as an overlay.

If you’re running on an emulator, the lack of Google Play is likely generating the error.

The other error sounds like something’s removing the view when it’s still needed. Are you doing anything to remove the overlay before you hide it?

No all fairly straight forward scene management like this

local function closeButtonEvent( event ) if event.phase == "ended" then storyboard.hideOverlay("fade", 200) end return true end

Could it be on low memory conditions that the view is somehow removed?

Sorry @sgs, looks like I dropped the ball on this post.

The top post is being handled here: https://forums.coronalabs.com/topic/69435-java-errors-being-captured-in-lua-global-error-handler/.

Let’s focus this on the overlay view problem.

First is this still an issue?

Is this an issue you’re able to reproduce or is it just an error your trapping is catching?

Are you catching low memory events?

Also do you have or can you turn on the neverStripDebugInfo setting?  See: https://docs.coronalabs.com/guide/distribution/advancedSettings/index.html#build-control

Rob

Wow this is an old post!  

Looks like the attempt to index field ‘view’ (a nil value) is coming from touch events (on images) that close the current overlay.  I actually saw someone double tapping so I’ve hardened the code on those events.

local function closeButtonEvent( event ) if event.phase == "ended" then event.target:removeEventListener( "touch", closeButtonEvent) \<-- added this storyboard.hideOverlay("fade", 200) end return true end

I’m glad you solved this.

Sorry @sgs, looks like I dropped the ball on this post.

The top post is being handled here: https://forums.coronalabs.com/topic/69435-java-errors-being-captured-in-lua-global-error-handler/.

Let’s focus this on the overlay view problem.

First is this still an issue?

Is this an issue you’re able to reproduce or is it just an error your trapping is catching?

Are you catching low memory events?

Also do you have or can you turn on the neverStripDebugInfo setting?  See: https://docs.coronalabs.com/guide/distribution/advancedSettings/index.html#build-control

Rob

Wow this is an old post!  

Looks like the attempt to index field ‘view’ (a nil value) is coming from touch events (on images) that close the current overlay.  I actually saw someone double tapping so I’ve hardened the code on those events.

local function closeButtonEvent( event ) if event.phase == "ended" then event.target:removeEventListener( "touch", closeButtonEvent) \<-- added this storyboard.hideOverlay("fade", 200) end return true end

I’m glad you solved this.