RuntimeExceptions (and IllegalStateException is one of them) most often mean your code is incorrect about how it tried to achieve something. Trying to handle such exception (for example by catching it) is also wrong. Your code should never behave the way Android would throw exception like this on you.
If you use Handlers and post or send message to be handled in the future, you need to clear the queue before going out of resumed state.
Also you cannot just start AsyncTask from Activity and commit transaction in onPostExecute because user could go back from your Activity. You need to cancel it and check if it was cancelled.
There are many examples like these and all are caused by "temporary" memory leaks, like I like to call them.
Basically your code is bad and without providing it, it is impossible to tell how.