How to catch EXC_BAD_ACCESS?

I made a game(the code is huge, i can't post it) where there is an array of all pixels on the screen and I have some moving objects. Sometimes, some drawing happens outside of the screen (bad i/o to/from the array of pixels) and my program crashes, when the debugger says: EXC_BAD_ACCESS in program. I can't fix the bad access to the array; is it possible to just ignore the exception and continue execution? I tried using try...catch(...) but it didn't work.
Last edited on
Is this done in console or you're using a graphics library? If it's in the console you'd be best of clipping the pixels that don't need to be displayed.
I am using SDL graphics library.
Topic archived. No new replies allowed.