Works in simulator but not in device

I dont know why but my game Works in simulator but not in device…
and I can’t see any error… when I tryied to change scene to another one… it don’t show up… but in simulator works fine… in simulator I can change scene without errors

anyone can help me? S: [import]uid: 23063 topic_id: 12711 reply_id: 312711[/import]

When this happens it is typically because something happens on the device that isn’t simulated.

Does the new scene have anything in it that the simulator wouldn’t show? Facebook, OpenFeint, Game Center, Internet activity of any sort, accelerometer, etc? [import]uid: 52491 topic_id: 12711 reply_id: 46618[/import]

Are you using images when changing scenes? If so, make sure that the images name match your code. In the Corona Windows simulator, it is more forgiving than the actual device.

For example, if you have background.png in you code but the image is labeled Background.png, it will work in the simulator but not the actual device.

@Peach, how did you become an Ansca Staff member? That’s awesome! [import]uid: 14218 topic_id: 12711 reply_id: 46640[/import]

@peach no I didn’t have anything like that

@spoggles no, my images were with numbers… it’s like… in scene 5 my background image is “5.png”… and i dont have another images in my scenes
only backgrounds and some Rects to be my buttons [import]uid: 23063 topic_id: 12711 reply_id: 46656[/import]

@dhenrich, what device and OS are you building for? which method are you using to change scenes?
have you checked for any capitalisation issues with file names etc?

one way i debug is putting print statements in critical functions so i can view in the simulator. if you happen to be getting your app on iOS then you can connect the device to you machine and view the device console to spot any warnings or errors.

[import]uid: 55009 topic_id: 12711 reply_id: 46684[/import]

it’s for iOS
and i have look at console but I dont get any error =S

and the method i’m using is:

director:changeScene( “scene3” )
Prints don’t will hlep me I guess… .because in simulator my game works fine… change scene and stuffs :S

dont know what to do [import]uid: 23063 topic_id: 12711 reply_id: 46687[/import]

@Dhennrich

I just got this exact same issue. The issue was with my variable name. It didn’t work property because I started the variable name with a number.

i.e.

local 30below = newImageRect("images/30below.png", 50, 10) --Didn't work  
  
local thirtyBelow = newImageRect("images/30below.png", 50, 10) --Worked!  

Could that be the issue you are facing? [import]uid: 31262 topic_id: 12711 reply_id: 46692[/import]

my variable name is “bg”
in all my scene I have a

local bg = display.newImageRect( ... ) bg.x = 0 bg.y = 0 gameGroup:insert( bg ) [import]uid: 23063 topic_id: 12711 reply_id: 46695[/import]

@Dhennrich,

Check your png file, that sounds like tying to use an incompatible png format.

Just to test it, replace your png with any of the ones from CoronaSDK sample project using your current code… [import]uid: 10478 topic_id: 12711 reply_id: 46697[/import]

Yes I experienced what PixelEnvision is saying too. I had to change my png to 16bit RGB I believe. Can’t remember exactly. [import]uid: 31262 topic_id: 12711 reply_id: 46698[/import]

yea… that right… how can i change my .png to this 16 bits rgb? [import]uid: 23063 topic_id: 12711 reply_id: 46704[/import]

@Dhennrich

As Carlos posted => “png’s have to be 32 bit png’s. no grayscales - and lastly, the filename must match (“img.png”) is no the same as “Img.PNG” on the device.”

32 bit means RGBA (each 8 bit)

Which program you are using to save png files? [import]uid: 10478 topic_id: 12711 reply_id: 46706[/import]

I just open it with Photoshop and open the Image menu, click on Mode, then check off RGB and also 16bits/channel.

Edit: Sorry I could be wrong, most likely 32bit as Pixel says above. [import]uid: 31262 topic_id: 12711 reply_id: 46707[/import]

thanks, i will change my images files =)

thank you so much [import]uid: 23063 topic_id: 12711 reply_id: 46709[/import]