Missing file and function names in LogCat

I’m testing my app on my Nexus 7. It runs just fine in the Corona Simulator, but on the device it’s choking when I load a certain scene. Sadly, the LogCat output isn’t very helpful, as you can see below. 

05-30 16:21:37.646: I/Corona(8883): Runtime error 05-30 16:21:37.646: I/Corona(8883): ?:0: attempt to index a nil value 05-30 16:21:37.646: I/Corona(8883): stack traceback: 05-30 16:21:37.646: I/Corona(8883): ?: in function '?' 05-30 16:21:37.646: I/Corona(8883): ?: in function \<?:242\> 05-30 16:21:37.646: I/Corona(8883): ?: in function 'dispatchEvent' 05-30 16:21:37.646: I/Corona(8883): ?: in function \<?:1096\> 05-30 16:21:37.646: I/Corona(8883): (tail call): ? 05-30 16:21:37.646: I/Corona(8883): ?: in function \<?:481\> 05-30 16:21:37.646: I/Corona(8883): ?: in function \<?:218\>

For what it’s worth, line 242 of the (apparently) broken scene is:

function scene:enterScene( event )

Just as frustrating as the broken stack trace is the fact that the app works fine in the simulator. 

N.B. this scene is the only one in my app that uses the ScrollView widget, in case that gives any clues. 

Thanks!

Do you have “return scene” at the bottom of your file?

When you see ?'s that means it’s happening inside a compiled part of Corona SDK.  The stack trace isn’t going deep enough to get to your code or it’s coming from an event handler (most likely) and you’re not passing in something that the event handler is looking for.

You can put in some print statements and try to narrow down what call is causing the issue.

Rob

Thanks guys. It ended up being a problem with adding a display group to the scrollview, and then adding items to the group, instead of adding them directly to the scrollview. Still not sure what the exact issue was or why it wasn’t showing in the simulator, but I’m guessing the scrollview was behaving a little wonky under the hood.

Do you have “return scene” at the bottom of your file?

When you see ?'s that means it’s happening inside a compiled part of Corona SDK.  The stack trace isn’t going deep enough to get to your code or it’s coming from an event handler (most likely) and you’re not passing in something that the event handler is looking for.

You can put in some print statements and try to narrow down what call is causing the issue.

Rob

Thanks guys. It ended up being a problem with adding a display group to the scrollview, and then adding items to the group, instead of adding them directly to the scrollview. Still not sure what the exact issue was or why it wasn’t showing in the simulator, but I’m guessing the scrollview was behaving a little wonky under the hood.