[RESOLVED] Build runs on iphone 5 but not on ipad 3

My game runs just like it does in the emulator on my iphone 5 but when I load it on an ipad 3 it works until I touch the player image (which is essentially a button)

I am getting this error on the Xcode console:

 <Warning>: Touch event began on: thisPlayer

 <Warning>: Lua Runtime Error: lua_pcall failed with status: 2, error message is: ?:0: attempt to index field ‘?’ (a nil value)

The obvious thing about it is that it tried to index a nil field, but what I can’t figure out is why it works fine on my phone and my emulator.  I’m not sure how to figure out what is wrong if it doesn’t fail on the emulator.

Any advice?

Thanks in advance

Are there more messages before that?

do you know where in your code this is happening?  Can you post that code?

Also, can you share you config.lua?

I’m sorry to have to say this, but I misdiagnosed the problem.  In fact, it was just a bug where I wasn’t accounting for screen orientation properly.  I just panicked, I guess.  The core of it was that I had never held the phone in the right landscape position while I was testing.  I loaded the game on the ipad and held it in that orientation and got an error when I tried to move the character.  I put it aside for a build because there were other bugs to fix and I had hoped that it would just kind of… go away.  When created a much superior build and loaded it on both devices, apparently I duplicated the behavior and was just lost.

The way I figured it out was to just put a ton of “print” commands and let it crash right in between two of them.  I don’t know if there is a better way to debug, but that is pretty much my standard procedure.

Thanks anyway.

Are there more messages before that?

do you know where in your code this is happening?  Can you post that code?

Also, can you share you config.lua?

I’m sorry to have to say this, but I misdiagnosed the problem.  In fact, it was just a bug where I wasn’t accounting for screen orientation properly.  I just panicked, I guess.  The core of it was that I had never held the phone in the right landscape position while I was testing.  I loaded the game on the ipad and held it in that orientation and got an error when I tried to move the character.  I put it aside for a build because there were other bugs to fix and I had hoped that it would just kind of… go away.  When created a much superior build and loaded it on both devices, apparently I duplicated the behavior and was just lost.

The way I figured it out was to just put a ton of “print” commands and let it crash right in between two of them.  I don’t know if there is a better way to debug, but that is pretty much my standard procedure.

Thanks anyway.