If an app crashes, the first step is always to look at the logcat where the full stack trace of the exception is shown. And if you then ask about a crash here, post the stack trace along with the relevant code excerpt.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database