You can't replace a fragment with itself. The first half of a replace is a removal of the previous fragment at that id. Once a fragment is removed it can no longer be added or used by the fragment manager (so the add portion of the replace will not work properly).
Depending on your use case, you have two options:
- Create a new fragment instead of reusing the existing instance
- Use some other method to see if its necessary to replace your fragment
Finally, you probably don't need to call executePendingTransactions.