found out why it failed when swiping and here is the link
http://stackoverflow.com/questions/3353023/android-illegalstateexception-when-is-it-thrown