The target application appears to have died

I am automating iOS app, getting this error “The target application appears to have died” and simulator is crashing randomly.

I have pretty much the same issue. I tried to check on UIAutomation to be sure that everything is alright, but it crashes only via Appium server.

EDIT

For my part, it appears only when I use app from Release mode, it works fine with a Debug app file.