Description

If user lock assets with Japanese comments outside source control, XML acquired in svn status may contain Japanese strings, and XML parsing may fail and become NotControlled.

This issue does not occur on English OS. I received a report from a licensee who is using Japanese OS.

The following is the cause of this issue and the correction code. This issue is using FUTF8ToTCHAR inside a loop. This fix resolves a issue that occurred with licensees. I'd like to you to incorporate it by all means.

bool FWindowsPlatformProcess::ExecProcess(...)
{
...
if (hStdOutRead != NULL)
{
// BEGIN BUGFIX
#if 1
TArray<uint8> StdOutBuffer, StdErrBuffer;
FProcHandle ProcHandle(ProcInfo.hProcess);
do
{
if (hStdOutRead && OutStdOut)
{
TArray<uint8> Buffer;
ReadPipeToArray(hStdOutRead, Buffer);
StdOutBuffer.Append(Buffer);
}
if (hStdErrRead && OutStdErr)
{
TArray<uint8> Buffer;
ReadPipeToArray(hStdErrRead, Buffer);
StdErrBuffer.Append(Buffer);
}
FPlatformProcess::Sleep(0);
} while (IsProcRunning(ProcHandle));
if (hStdOutRead && OutStdOut)
{
TArray<uint8> Buffer;
ReadPipeToArray(hStdOutRead, Buffer);
StdOutBuffer.Append(Buffer);
StdOutBuffer.Add('\0');
*OutStdOut = FUTF8ToTCHAR((const ANSICHAR*)StdOutBuffer.GetData()).Get();
}
if (hStdErrRead && OutStdErr)
{
TArray<uint8> Buffer;
ReadPipeToArray(hStdErrRead, Buffer);
StdErrBuffer.Append(Buffer);
StdErrBuffer.Add('\0');
*OutStdErr = FUTF8ToTCHAR((const ANSICHAR*)StdErrBuffer.GetData()).Get();
}
#else
HANDLE ReadablePipes[2] = { hStdOutRead, hStdErrRead };
FString* OutStrings[2] = { OutStdOut, OutStdErr };
FProcHandle ProcHandle(ProcInfo.hProcess);
do
{
ReadFromPipes(OutStrings, ReadablePipes, 2);
FPlatformProcess::Sleep(0);
} while (IsProcRunning(ProcHandle));
ReadFromPipes(OutStrings, ReadablePipes, 2);
#endif
// END BUGFIX
}
else
{
::WaitForSingleObject(ProcInfo.hProcess, INFINITE);
}
...
}
Steps to Reproduce
  1. Lock assets with Japanese comments outside source control ( ex. explorer of windows)
  2. Open project
  3. the locked asset's status may become NotControlled

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-76809 in the post.

1
Login to Vote

Fixed
ComponentUE - Foundation - Core
Affects Versions4.20.34.21.2
Target Fix4.24
Fix Commit7275613
Main Commit8614014
Release Commit9552237
CreatedJun 28, 2019
ResolvedJul 11, 2019
UpdatedMar 30, 2021