Most likely a software glitch. Try backing up to iCloud or iTunes and hitting "Reset All Settings" under Settings, General, and Reset. If that does not solve it, try restoring in iTunes.
When I was playing doodle jump are just sending a text it would turn off the day after I got out of a white screen error. I just restored and it hasn't happened. Try to back up in iTunes and then restore and see if that helps. If not, it could be the battery or a shortage. Also if you can, go into Settings, general, about, and diagnosistics & usage. If you can look at the latest one after you crash and it says something about crashing, then I would restore. If not, go to apple and have them look at it. Also, what % does it go out at most? Mine was 49%.