Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout and Submit both crash UE 4.25.3 #147

Open
CGeorges opened this issue Aug 11, 2020 · 8 comments
Open

Checkout and Submit both crash UE 4.25.3 #147

CGeorges opened this issue Aug 11, 2020 · 8 comments
Assignees

Comments

@CGeorges
Copy link

CGeorges commented Aug 11, 2020

I use UE4GitPlugin and Gitea in a new Top down project, whenever I click "Checkout" or Submit it will crash UE4 with error "Out of video memory...", it seems in a second it fills up 8GB of video memory.

@CGeorges
Copy link
Author

image

@CGeorges
Copy link
Author

CGeorges commented Aug 12, 2020

I can see this in the logs on crash

[2020.08.11-23.02.41:794][627]LogSourceControl: RunCommand: 'git lfs unlock "Content/Animations/ThirdPerson_AnimBP.uasset"'
[2020.08.11-23.02.42:983][627]LogSourceControl: RunCommand: 'git lfs locks'
[2020.08.11-23.02.43:238][627]LogD3D12RHI: Error: CommandList->Close() failed 
 at D:/Build/++UE4+Licensee/Sync/Engine/Source/Runtime/D3D12RHI/Private/D3D12CommandList.cpp:134 
 with error E_OUTOFMEMORY

Full log started from a clean file, boot up UE4 project and checkout 1 file, then crash:
PartyTowers.log

@CGeorges
Copy link
Author

Ran UE4 through VS and it seems when doing a checkout theres definitely a memory leak
image

It's something here in GitSourceControlUtils.cpp but not sure as to what

if (!BranchName.IsEmpty())
		{
			// Using git diff, we can obtain a list of files that were modified between our current origin and HEAD. Assumes that fetch has been run to get accurate info.
			// TODO: should do a fetch (at least periodically).
			TArray<FString> Results;
			TArray<FString> ErrorMessages;
			TArray<FString> ParametersLsRemote;
			ParametersLsRemote.Add(TEXT("origin"));
			ParametersLsRemote.Add(BranchName);
			const bool bResultLsRemote = RunCommand(TEXT("ls-remote"), InPathToGitBinary, InRepositoryRoot, ParametersLsRemote, OnePath, Results, ErrorMessages);
			// If the command is successful and there is only 1 line on the output the branch exists on remote
			const bool bDiffAgainstRemote = bResultLsRemote && Results.Num();

			Results.Reset();
			ErrorMessages.Reset();
			TArray<FString> ParametersLog;
			ParametersLog.Add(TEXT("--pretty=")); // this omits the commit lines, just gets us files
			ParametersLog.Add(TEXT("--name-only"));
			ParametersLog.Add(bDiffAgainstRemote ? TEXT("HEAD..HEAD@{upstream}") : BranchName);
			const bool bResultDiff = RunCommand(TEXT("log"), InPathToGitBinary, InRepositoryRoot, ParametersLog, OnePath, Results, ErrorMessages);
			OutErrorMessages.Append(ErrorMessages);
			if (bResultDiff)
			{
				for (const FString& NewerFileName : Results)
				{
					const FString NewerFilePath = FPaths::ConvertRelativePathToFull(InRepositoryRoot, NewerFileName);

					// Find existing corresponding file state to update it (not found would mean new file or not in the current path)
					if (FGitSourceControlState* FileStatePtr = OutStates.FindByPredicate([NewerFilePath](FGitSourceControlState& FileState) { return FileState.LocalFilename == NewerFilePath; }))
					{
						FileStatePtr->bNewerVersionOnServer = true;
					}
				}
			}
		}

@CGeorges
Copy link
Author

CGeorges commented Aug 13, 2020

I've used this fork https://github.com/ProjectBorealis/UE4GitPlugin and shared video memory no longer gets filled.

@Acren
Copy link

Acren commented Mar 24, 2021

I'm getting this in 2.17, 4.26, even without running any commands. Just importing some assets and having it automatically check the status is enough to have it run out of video memory.

@christopher-buss
Copy link

christopher-buss commented May 18, 2021

This is happening to one of my colleges, 4.26. Almost definitely a memory leak. Just trying to check back in a file causes his ram usage to spike up before Unreal crashes.

@CGeorges
Copy link
Author

This is happening to one of my colleges, 4.26. Almost definitely a memory leak. Just trying to check back in a file causes his ram usage to spike up before Unreal crashes.

I haven't really found a solution for this back then, I even bought the commercial solution of this plugin on UE4 marketplace and that one was crashing as well. We switched to Perforce and never looked back.

@SRombauts SRombauts self-assigned this Apr 28, 2022
@SRombauts
Copy link
Owner

see #139 that will track the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants