Inexplicable crash - only on iphone 4

Hi,

My friend downloaded my app, and found that it crashed on his iPhone 4.  My app doesn’t crash on my iPhone 4s.  The error is gives is "bad argument #2 to 'newImageSheet (for single frame size, ‘options’ table must contain valid 'width and ‘height’ values).  Now I’ve seen things like this before, but it surprises me since it works perfectly on my 4s which has same screen resolution as iphone 4.  There is also no line number so I can’t see where it is, and I don’t have an iphone 4 to test it out.

Any ideas what this might be about?  He is using ios 7.1

Thanks for your help!

You’re not loading a file from system.DocumentsDirectory that you might have managed to create in your app sandbox but wasn’t created when your friend downloaded the file?  Argument #2 should either be a table with your options or a directory reference.

Could your friend be finding a different path to where the image sheet is being loaded that would cause the options table to not populate correctly?

Rob

I have the same issue. What is the solution?

Are you having it all the time, or just occasionally?

Yes. it’s like always there’s a damn problem with these sprites things on iphone4 and just iphone4… recently I changed my design so that I won’t need to use sprites. but please give us a solution for this issue. it’s so important

I use spritesheets and test on an iPhone 4 and don’t see a problem. Are you using the dynamic image selection? Can you provide some code to take a look at from your sprite functions and your config.lua file?

it’s so weird. I used to generate avatar for users with help of sprite sheets. There were 5 sprites and 4 of them were perfectly fine on all devices but one them related to avatar’s mouth was stopped by the error. I comment the mouth sprite and the game worked fine. I evaluate every inch of my code and tested it but nothing was wrong in point of my group. by the way I didn’t use any dynamic image selection on these sprites.

You’re not loading a file from system.DocumentsDirectory that you might have managed to create in your app sandbox but wasn’t created when your friend downloaded the file?  Argument #2 should either be a table with your options or a directory reference.

Could your friend be finding a different path to where the image sheet is being loaded that would cause the options table to not populate correctly?

Rob

I have the same issue. What is the solution?

Are you having it all the time, or just occasionally?

Yes. it’s like always there’s a damn problem with these sprites things on iphone4 and just iphone4… recently I changed my design so that I won’t need to use sprites. but please give us a solution for this issue. it’s so important

I use spritesheets and test on an iPhone 4 and don’t see a problem. Are you using the dynamic image selection? Can you provide some code to take a look at from your sprite functions and your config.lua file?

it’s so weird. I used to generate avatar for users with help of sprite sheets. There were 5 sprites and 4 of them were perfectly fine on all devices but one them related to avatar’s mouth was stopped by the error. I comment the mouth sprite and the game worked fine. I evaluate every inch of my code and tested it but nothing was wrong in point of my group. by the way I didn’t use any dynamic image selection on these sprites.