Error with widget when submitting to AppStore

Apple experiences a strange error in my game, when I submitted it to the AppStore, so they can’t approve it.

They get a “?:0: attempts to index a nil value” error – see the attached screenshot. I am not getting
the error on the Corona Simulator or the XCode simulator (with my release build certificate), so it’s hard for me to fix the bug. I can see in the screenshot, that the error is generated when the bottom row of buttons are getting build. As you can see on the screenshot, the first button is created at (0, 0), but not
moved into place yet.

It looks like an error with an array, but the only array I use, is the text for the label, and the button already has its label attached (NEW GAME).

I’m currently building on the latest public release of Corona (2013.1076).

Here are the code for that part of the game.

local newGameButton = widget.newButton{ id = "newGame", label = \_text[7], defaultFile = "gfx/new-icon.png", overFile = "gfx/new-icon-rollover.png", width = 80, height = 44, font = "Kefa", fontSize = 12, labelYOffset = 10, labelColor = { default={ 199, 153, 131, 200 }, over={ 199, 153, 131, 255 } }, onRelease = onButtonEvent } newGameButton:setReferencePoint( display.LeftTopReferencePoint ) newGameButton.x = 0 + (\_w/8-40) newGameButton.y = \_h - 44 gameMenuGroup:insert( newGameButton )

I have other buttons in the game (on the menu screen), and they must be working, as they have to go through the menu screen, to get to the game screen.

I have released the game to Google Play, with no issues.
https://play.google.com/store/apps/details?id=com.cphcloud.mastermind

Any suggestions on how to fix the bug?

Maybe I have a hunch, of what the bug might be.

The other places I use the widget.newButton, I declare the left and top values, but not in this part of the game. Maybe that’s the issues. But it’s hard to tell, as neither the Corona Simulator, nor xCode simulator (or when testing it locally on my own device via TestFlighApp), gives me any errors.

Can the left/top vs. x/y declaration be the cause of my issues at Apple?

Should I change the code to this, and resubmit it to Apple (I don’t want to upset them, if it doesn’t fix the error)?

local newGameButton = widget.newButton{ id = "newGame", label = \_text[7], defaultFile = "gfx/new-icon.png", overFile = "gfx/new-icon-rollover.png", width = 80, height = 44, left = 0 + (\_w/8-40), top = \_h - 44, font = "Kefa", fontSize = 12, labelYOffset = 10, labelColor = { default={ 199, 153, 131, 200 }, over={ 199, 153, 131, 255 } }, onRelease = onButtonEvent } gameMenuGroup:insert( newGameButton )

Maybe I have a hunch, of what the bug might be.

The other places I use the widget.newButton, I declare the left and top values, but not in this part of the game. Maybe that’s the issues. But it’s hard to tell, as neither the Corona Simulator, nor xCode simulator (or when testing it locally on my own device via TestFlighApp), gives me any errors.

Can the left/top vs. x/y declaration be the cause of my issues at Apple?

Should I change the code to this, and resubmit it to Apple (I don’t want to upset them, if it doesn’t fix the error)?

local newGameButton = widget.newButton{ id = "newGame", label = \_text[7], defaultFile = "gfx/new-icon.png", overFile = "gfx/new-icon-rollover.png", width = 80, height = 44, left = 0 + (\_w/8-40), top = \_h - 44, font = "Kefa", fontSize = 12, labelYOffset = 10, labelColor = { default={ 199, 153, 131, 200 }, over={ 199, 153, 131, 255 } }, onRelease = onButtonEvent } gameMenuGroup:insert( newGameButton )