Tricky bug - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: Tricky bug (/thread-9301.html)
Tricky bug - markhula - Aug 25, 2011 07:11 AM
Not had this bug before ; so assume it's me but can't trace it. Have upgraded to Lion and latest Xcode 4.
Basically a texture seems to have it's UV's wrong but only on almost every other download to the simulator.
i.e. I can download and it's fine, then not, then fine, then not etc. - without recompiling or anything.
I've sat in the debugger checking things but can see nothing wrong. The texture seems correct but the uv's seem wrong. Only seems to happen on this one and only texture.
It's tricky!, wondering if somehow there's something I can use perhaps in instruments or maybe new in Xcode 4 to help me isolate this annoying thing :-)
Any help appreciated
EDIT: Have forced this one texture to always have the same frame. The uv's (using printf's) are correct all the time i.e. when the texture is drawn correctly or not!; can't see what else could cause this....
Ok this is ultra weird!
I now the display the entire questionable texture on screen.
Every other time it is perfect, the alternative time's it's completely different!!! - and I am not doing any processing on the texture!!! - erk!!!. Is it possible wonderful Xcode 4 is 'pre-processing' it somehow (for what reason?) and altering it!!!?!!!!!!!!!!!!!!!!!!
Can confirm that although PNG compression is off; something is altering my png (not an icon, but in game texture). Ever since Xcode 4 upgrade. Wow, serious bug!!!. Can't try on device yet so it could just be a simulator 'thing'. Have googled and can't see anyone else with a similar problem!!!
RE: Tricky bug - MattDiamond - Aug 26, 2011 10:09 AM
Would be good to isolate whether it is loaded incorrectly right off the bat, or if instead it gets corrupted later.
RE: Tricky bug - OneSadCookie - Aug 26, 2011 10:36 AM
Xcode has always mangled PNGs when building for iOS... it's possible to disable it, but it doesn't seem to explain your alternating good/bad behavior.
RE: Tricky bug - markhula - Aug 27, 2011 12:57 AM
It's well weird.
If I change the texture i.e. make it completely different. Then it will alternate on each download between the correct texture and some old/corrupt image (i.e. nothing like the original texture).
Does suggest Xcode has a temp file somewhere with this in, and is picking it up - though why it should alternate is beyond me.
Have logged the bug with Apple - just wondered if I was the only one in the world with this issue!!