I'm working on a project at the moment in CodeBlocks using SDL2. At some point during development (I'm not exactly sure when ) the application began to segfault upon closing down.
If I set a breakpoint somewhere and step through the code line-by-line, the crash doesn't happen until after the app successfully executes return 0; at the end of int main, so I don't know where I should be looking for the error.
When the segfault occurs, the console output usually reads "Process returned 255 (0xFF)", although I infrequently get "Process returned -1073741819 (0xC0000005)" instead, seemingly at random. 0xC0000005 as far as I can tell means it is accessing memory it shouldn't?
Here's a screenshot of the call stack:
I would post some code, but I have no idea what code might actually be relevant and the project is very large. I would welcome any insight here as I have no idea what is going on! Thanks in advance for any replies.
edited to add: apologies if this question would be better suited for a different subforum, I didn't really know where to put it
Edited by chiranjivi, 26 July 2014 - 02:32 PM.