This function of window restoration makes my app unlaunchable, for instance after a crash (or I click stop in xcode). I don't want the users of my app to face the same problem and be unable to launch anymore the app.
That should only be true if your stored state is corrupt or you've changed the keys you store it under.
In normal circumstances, state restoration exists to save user data (that they haven't manually saved) in the event of a crash—your users will want it to be there when the app crashes on them.
For debugging purposes, you can disable state restoration in your Xcode scheme: