Do you, by chance, have array overflow? It's about all I can come up with. What this means is that, if you declare an array like this:
ExampleArray[10];
And you try to access ExampleArray[12], this will cause a crash. Check to make sure you don't have this, especially if you have some math in the brackets (like "ExampleArray[(Row*TotalColumns)+Column] = 0;".
The best way that I know of to finding where a crash occurs is to comment out all but one part of your code. If it works without crashing, remove some other area out of the commented out area and try again. If it crashes, you've found the culprit, but leave that area commented out and try the other areas as there could be more than one area. Once all bad areas are isolated, then find out what is going on. I did this quite regularly, and often filling functions with lots of debug-related things and using printf to display what the variable's values are to make sure they are working as expected.

