[Bug] On close, editor fails to save bc of Perforce but closes anyway. Results loss of work

Branch: Source Build (but problem exists in binary build)

Build version: 4.10.0-0

Detailed description of the issue:
Closing the editor + saving should be transactional e.g. if saving fails, the editor should not close to allow the user to address the save failure.

On closing, the editor asks to save files for any unsaved work. If the save fails b/c the file could not be checked out or the perforce permissions token expired, the editor will proceed to close resulting in loss of work.

Instead of closing, the editor should cancel out of the close so the user can address the source of the save failure.

I’ve hit this several times over the last 6 months and we’ve been getting around it by manually pressing save all before closing the editor. Of course, someone always forgets to do this b/c they’re new or if they’re tired at the end of a long day, and then they end up losing half a day’s worth of work sometimes.

This happens frequently b/c the save usually fails b/c the perforce user token expired and UE4 doesn’t ask you to reauthenticate, it just silently fails.

Repro Steps

  1. Make sure you are logged into perforce
  2. Open up a UE4 project that’s connected to perforce
  3. Make a change to an asset that’s in the perforce repository (e.g. BP_Test)
  4. Make a change in the blueprint but do not save or checkout
  5. In your perforce client, log off (In P4V, go to Connection menu => Log Off)
  6. Back in UE4, exit
  7. UE4 will ask you to save. Click Yes
  8. UE4 will then ask you to Check Out your edited asset (e.g. BP_Test). Click yes
  9. UE4 will attempt to checkout, then it will fail, then it will close the editor, resulting in your changes lost

Expected Behavior: It should stop the closing of the editor and display an error message saying saving failed (it does this in other scenarios already)

System Specs: N/A

Hey Ikrima-

I was able to reproduce the behavior you mentioned and have entered a bug report (UE-25039) for investigation. Unfortunately the only workaround would be to do as you have been and making sure to save manually before closing the editor.

Cheers