I'm making a thread about this here because although I've extensively covered the findings of a days testing
in another thread, I didn't want the point or the implication to get lost or diluted.
Simply put, ALL glbasic applications (as far as I can tell) built for iPhone OS4 and deployed for 3.x, which I believe is Apple's requirement for acceptance, will crash on exit on any iPhone or iPod that supports multi-tasking (ie, a very large number of devices). In doing so, GLB_ON_QUIT is never called. The implication of this, of course, is that any state saving or tidying up you try and do on exit never happens.
Under OS4, any device supporting multi-tasking apparently ALWAYS puts the app to the background when you exit, whether you exit normally, or exit to the multi-tasking bar. Glbasic apps, though, seemingly cant recognise that it's a background task and will try to illegally write to the screen with SHOWSCREEN, and generates an application error, "background gpu access not permitted", which results in the application crashing immediately without executing any further code.
From the
Apple documentation:
Do not make any OpenGL ES calls from your code. You must not create an EAGLContext object or issue any OpenGL ES drawing commands of any kind. Using these calls will cause your application to be terminated immediately.
This is the same for GLB7 and GLB8. The same code used for testing does indeed quit successfully when compiled and built for OS3 only, but of course that isn't really the point, other than to demonstrate that this is a problem with glbasic and OS4.
I also noted in the other thread that I had tried both with and without 'AUTOPAUSE TRUE' with the same results. I also noted that using HIBERNATE to halt showscreen calls wasnt really an option because it causes the application screen to flash to black every time we update the screen.
Admittedly, testing isn't made easy by the fact I have to send code to Mike to compile for xcode, run on a device I don't have access to, and then watch the results by screensharing or video

I'd really appreciate if this could be looked at as soon as possible; for us, at least, it's pretty much a 'show stopper'; and that includes our just released app getting an update... not only can we not support pause and resume, but we can't even code our own save and load. And if you haven't had this problem, then thats just because you haven't released an app or update since OS4!