Gabriel #1 Write debug info out to a text file instead to get a rough idea of where you are when it crashes. I'd guess a memory leak or stack corruption.