Android: Custom Surface View crashing upon orientation change

view story

http://stackoverflow.com – I was reading this tutorial (http://android-er.blogspot.com/2010/05/another-exercise-of-surfaceview-i...) on how to use a custom surface view class in an XML layout and when I ran the code, the app crashed when my phone's orientation changed. I've noticed a lot of examples involving custom threads and surface view subclasses crashing when the orientation changes, does anybody have any idea why this is happening? (HowTos)