I have developed a few apps. But, in all those apps there is a common problem where when I go to the recents section in android it shows a black screen instead of the last state of the app.

When I press the recents button and click on my app it just crashes without any error and I have to reopen the app and it works fine.
All of the above problems don't seem to happen in the debug version of the app, only the release version.
