Sometimes method SDL_ukitopenglview.swapBuffers was crashing on me, and I didn’t knew when.
Now I can reproduce the problem, it seems like a bug, not sure.
I’m opening the itunes app store from my game, and everytime I do this, swapBuffers crashes with EXC_BAD_ACCESS.
This isn?t really a bug, you just need to handle app events properly (i.e. call glFinish inside an event watch callback when SDL_APP_DIDENTERBACKGROUND is triggered, and make sure to not call any GL functions or SwapWindow after that.)
SDL?s readme-iOS file shows how to use the app events with an event watch callback, as well.On Aug 30, 2014, at 5:48 PM, Limanima <jorge.raposo.lima at gmail.com> wrote:
Sometimes method SDL_ukitopenglview.swapBuffers was crashing on me, and I didn’t knew when.
Now I can reproduce the problem, it seems like a bug, not sure.
I’m opening the itunes app store from my game, and everytime I do this, swapBuffers crashes with EXC_BAD_ACCESS.
To clarify, the OS is killing your app, it?s not necessarily crashing.On Aug 30, 2014, at 5:53 PM, Alex Szpakowski <@Alex_Szpakowski> wrote:
This isn?t really a bug
On Aug 30, 2014, at 5:48 PM, Limanima <jorge.raposo.lima at gmail.com> wrote:
Sometimes method SDL_ukitopenglview.swapBuffers was crashing on me, and I didn’t knew when.
Now I can reproduce the problem, it seems like a bug, not sure.
I’m opening the itunes app store from my game, and everytime I do this, swapBuffers crashes with EXC_BAD_ACCESS.
This isn?t really a bug, you just need to handle app events properly (i.e. call glFinish inside an event watch callback when SDL_APP_DIDENTERBACKGROUND is triggered, and make sure to not call any GL functions or SwapWindow after that.)
SDL?s readme-iOS file shows how to use the app events with an event watch callback, as well.
I’m actually pausing/resuming my draw/update loop when the application enters background/foreground, but I wasn’t calling glFinish. I added glFinish and it seems to be fine now!
This gFinish detail is not in the readme, and my opengl knowledge is unfortunately weak.