Tuesday, 25 December 2012

PVR image not loading issue (glError: 0x0501) with iPod Touch 4th Generation

Merry Christmas everyone! Hope everyone got you wished for!

Bought a 4th generation iPod Touch for kid, one personal reason for that is, I already have an iPhone 3GS and an iPhone 5, therefore need something in the middle to cover all main iPhone models so that I can test all my apps properly, heh heh heh....

So while no one is paying attention to the iPod Touch (busy reading the new Diary of Wimpy Kid book...), I quickly installed my apps on it for a quick test.

Mespfi works perfectly well, that's a tick, good job!

Strangely, Where Is It - Smart Kids Edition (uses Cocos2d) didn't. Although the splash page shows up ok, As below, none of the images for the main menu (and all pages after that as well) loads properly.


Quickly connect to XCode and tried again - it died too, as below due to this "glError: 0x0501" error. But if it works in all versions of simulators, plus iPhone 3GS, iPhone 5 and iPad 2, why doesn't it work with iPod Touch 4th generation??!!

As I have seen this error before (see this post) I know straight away it's due to the size of the texture .pvr files. After shuffle the images around for the iPhone ones, and removed the following 2 lines from the script that creates the texture files using TexturePack, that fixed the problem.


--max-width 4096 \
--max-height 4096 \


Unfortunately App Store won't be available until 28/12, have to wait a few more days to submit the update.

That worries me a bit, I thought all Apple products should be quite similar and wouldn't need to test your apps in all different versions of physical devices?

Sunday, 9 December 2012

Issue with iOS 6 Game Center landscape app issue fixed

Got my iPhone 5 temporarily working by connecting to WiFi while still waiting for the new SIM. First thing I did was obviously download my 2 games from App Store and have a go, but to my biggest shock, Where Is It Smart Kids Edition crashed after the splash page, how could this be??!!

Tried it in XCode and it crashed too! Error message as below:


2012-12-09 20:53:19.490 Where is it[395:907] *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
*** First throw call stack:
(0x3978d3e7 0x387e6963 0x3978d307 0x33005857 0x331a9f21 0x33089cdd 0x33088f6b 0x39790ad4 0x396e828f 0x331a70f3 0x352b2e01 0x32575793 0x325755db 0x32578e45 0x397611b1 0x396d423d 0x396d40c9 0x3983033b 0x32ff1291 0xdf2d9 0x4c410)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

Found this link from Stackoverflow.com which describes something similar to what I am experiencing, which only happens to iOS 6 Game Center for Apps only supporting Landscape display.  Delete the app and download from App Store again and test with Game Center logged in, and it works without problem. Problem identified!

Urh, hang on, I thought I fixed the problem in previous release already??!! Further investigation shows I missed something in my last release. And as my 3GS always has Game Center logged in, that's why it wasn't picked up during pre-release testing, damn! Definitely have to add this testing next time.

The fix is easy, before, the setup looks like this:

Just need to click on the 2 "Portrait" and "Upside Down" icons in "Supported Interface Orientations" and that fixed the problem. The setup now looks like this:


Issue fixed. Lucky the App Store still available before 20th December, hope there's not too many apps waiting for review and can still get reviewed before Christmas with the normal 7-8 days waiting time, fingers crossed...