See steps to repro above.
Steps to Reproduce
TLDR: This issue appears to require Perforce, and an undo at the 100th item in the P4 history of a given file. The editor locks up with an infinite loop getting history. This is with a modified version of UE5.5.4, but there are no modifications to the files involved. I have looked in your P4’s Main depot, and no changes to SSourceControlHistory.cpp have happened in this function.
Longer repro steps:
- This requires Perforce as the source control.
- For a content file (e.g. uasset) in Perforce, the 100th revision in history needs to be an undo. You might be able to make undo/redo (undo-of-undo) 100 times. Or, query fewer than 100 items in the history.
- In Unreal Editor, content browser, find that file, get file history
- There’s an infinite loop in FSourceControlWindows::DisplayRevisionHistory(), making the editor soft-lock
- The infinite loop stems from that 100th item being a ‘branch’ , BranchSource = InitialHistory->GetBranchSource(); returning a valid entry. However, that branch comes from the undo, so it’s a branch of the same file. RevisionName is set to the same file. It then looks for history on that same item, and that 100th entry is the same item, looping forever
I have what seems like a workaround - to keep a separate TArray<FString> RevisionNamesEverConsidered which contains every item ever added to RevisionName. After detecting a branch, it puts the filename into RevisionName only if it was never present in RevisionNamesEverConsidered .
I believe this is because Perforce treats an undo as a branch of the file(s) involved. Versus a branch that changes the file paths, etc
Hello, this issue is tracked at Unreal Engine Issues and Bug Tracker (UE\-228377)