Runtime error help

i am having a problem opening a scene in my app. i get an error it goes

RUNTIME ERROR

Users/jenkens/slaveroot/workspace/templates/label/android/subrepos/composer/composer/composer.lua:1451:/users/jenkens/slaveroot/workspace/templates/label/android/platform/resources/init.lua:87:addeventlistener: listner cannot be nil: nil

i only get this error on androids never on the sim

Whats on like 87 in init.lua? Can you share that line and maybe a couple more that are maybe related to it? Sometimes the simulator doesn’t show the problem but on the device it occurs.

–SonicX278

That line refers to assets to which Corona SDK developers do not have access. 

What that error means, is that there is an event listener that was added, which doesn’t actually exist. It could be something as simple as:

local randomObject = display.newRect(0,0,100,300) function doThis(event) if event.phase == "ended" then print("I'm pressing doThis") end end randomObject:addEventListener("touch", doThat) -- notice how the actual event listener handle is different

Check through your code and ensure that everything matches up.

Also it really helps to look at your device’s console log for additional messages that might hint to where the problem is.  Please read:

http://docs.coronalabs.com/guide/basics/debugging/index.html

Rob

Thanks it was something to do with my platform checking

Whats on like 87 in init.lua? Can you share that line and maybe a couple more that are maybe related to it? Sometimes the simulator doesn’t show the problem but on the device it occurs.

–SonicX278

That line refers to assets to which Corona SDK developers do not have access. 

What that error means, is that there is an event listener that was added, which doesn’t actually exist. It could be something as simple as:

local randomObject = display.newRect(0,0,100,300) function doThis(event) if event.phase == "ended" then print("I'm pressing doThis") end end randomObject:addEventListener("touch", doThat) -- notice how the actual event listener handle is different

Check through your code and ensure that everything matches up.

Also it really helps to look at your device’s console log for additional messages that might hint to where the problem is.  Please read:

http://docs.coronalabs.com/guide/basics/debugging/index.html

Rob

Thanks it was something to do with my platform checking