You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209807 on 2016/11/24 by Chris.Wood CRP now has improved handling of lost comms with website/DB (CRP v.1.2.9) [UE-38397] - CrashReportProcess should not lose crashes when the website goes down. Change 3209936 on 2016/11/24 by Steven.Hutton Reconciled offline work. Fixed a number of display bugs with the reports page. Change 3209938 on 2016/11/24 by Steven.Hutton Reconciled offline work Adding JQuery UI packages Change 3210736 on 2016/11/28 by Steve.Robb Unset() made protected, which is an implementation details of TFunction and not the way to unbind one (may leak memory). Fixes to existing calls. https://answers.unrealengine.com/questions/494947/proper-way-to-deal-with-destroying-a-tfunction.html Change3211181on 2016/11/28 by Steve.Robb Improved error message when binding a delegate to a pending kill object. #jira UE-5232 Change 3211214 on 2016/11/28 by Steve.Robb PR #2978: fixed typo in FMallocLeakDetection (Contributed by finap) #jira UE-39049 Change 3211301 on 2016/11/28 by Steve.Robb PR #2892: Copy bCustomVersionsAreReset when creating an Archive from another Ar. (Contributed by surakin) #jira UE-37941 Change 3213387 on 2016/11/29 by Steven.Hutton Test of a release note parsed from the changelist Change 3213553 on 2016/11/29 by Gil.Gribb UE4 - Rework dependencies and UStruct creation so that we can create UBlueprintGeneratedClass's without needing the parent class serialized. Change 3214800 on 2016/11/30 by Robert.Manuszewski ModuleManager will now use a critical section instead of FMultiReaderSingleWriterGT to make it really thread safe. - removed FMultiReaderSingleWriterGT because it was not fully thread safe Change 3214926 on 2016/11/30 by Robert.Manuszewski Merging using Dev-Core_To_Dev-LoadTimes (reversed) Change 3214981 on 2016/11/30 by Gil.Gribb UE4 - Make sure that subobjects of CDOs are exported even if they don't have any direct references; they might be archetypes. Change 3215392 on 2016/11/30 by Steve.Robb Error out on editor builds when reading a non-boolean value in an archive. Change 3215674 on 2016/11/30 by Steve.Robb Replacement of a custom scope-exit setup with our standard macro. Change 3215720 on 2016/11/30 by Steve.Robb Default constructor for TTuple which value-initializes the elements. Change 3216777 on 2016/12/01 by Graeme.Thornton Add NoRedist and NotForLicensees folders in the game folder to the C# version of config file hierarchy. Change 3216858 on 2016/12/01 by Graeme.Thornton Improvements to pak signing and encryption - Remove compile time defines for encryption key and signing keys - Embed keys in executable by including in the UBT generated UELinkerFixups.cpp file - Add key access core delegate for passing these keys through to pak platform file Change 3216860 on 2016/12/01 by Graeme.Thornton Re-enable pak signing and encryption in ShooterGame Change 3216861 on 2016/12/01 by Graeme.Thornton Re-enable pak signing and encryption in Paragon Change 3217076 on 2016/12/01 by Gil.Gribb UE4 - replaced !GIsIntialLoad with EVENT_DRIVEN_ASYNC_LOAD_ACTIVE_AT_RUNTIME as a first step toward boot time EDL Change 3221139 on 2016/12/05 by Ben.Woodhouse Dummy integrate of CL 3221131 (versioning workarounds) from Dev-LoadTimes4.14 with accept target to prevent those workarounds being merged out of dev-loadtimes4.14. Command: p4 integrate //UE4/Dev-LoadTimes4.14/...@3221131,3221131 w/ resolve/accept-target Change 3221410 on 2016/12/05 by Steve.Robb Allow Algo::IsSorted to work on C arrays and initializer_lists. Change 3221673 on 2016/12/05 by Gil.Gribb set up an intentional merge conflict so we can do the right thing when dev-BP and dev-core come together Change 3223182 on 2016/12/06 by Chris.Wood Add EngineModeEx to CrashReportCommon [UE-39258] - Update CrashReporter to include whether Engine crashes are from vanilla build or not Change 3224646 on 2016/12/07 by Robert.Manuszewski It's no longer necessary to rebuild the cooked exe to enable the event driven loader. EDL and the new async IO are now controlled with ini settings only. Change 3224647 on 2016/12/07 by Robert.Manuszewski Event Driven Loader is now enabled by default. Change 3224669 on 2016/12/07 by Chris.Wood Compressing some crash files output from CRP to S3 (CRP v1.2.11) [UE-37564] - Add compression support for CRP crash files in S3 Add EngineModeEx to support to CRP (CRP v1.2.10) [UE-39258] - Update CrashReporter to include whether Engine crashes are from vanilla build or not Change 3224873 on 2016/12/07 by Robert.Manuszewski A few fixes to the EDL macro refactor. Change 3224933 on 2016/12/07 by Robert.Manuszewski Async Loading settings will now be logged on startup in cooked games Change 3224984 on 2016/12/07 by Robert.Manuszewski Small fix to EDL and new async IO global var init. Change 3225027 on 2016/12/07 by Robert.Manuszewski Re-enabling EDL in ShooterGame since it no longer requires the cooked exe to be re-compiled (and EDL is on by default anyway). Change 3226702 on 2016/12/08 by Steve.Robb UHT can now skip over macro-like identifiers while parsing. Correctly handles FTypefaceEntry::Name parsing, which was broken by the workaround in CL# 3219332. Syntax workaround reverted in FTypefaceEntry. #jira UE-38231 Change 3226756 on 2016/12/08 by Steve.Robb LexicalConversion renamed to Lex after #core discussion. Lex::ToString overloads added for FString itself. Change 3226766 on 2016/12/08 by Steve.Robb FCookStatsManager::ToString replaced with Lex::ToString, as it now supports the required functionality. Change 3226949 on 2016/12/08 by Robert.Manuszewski Fixing static analysis warnings Change 3228566 on 2016/12/09 by Robert.Manuszewski Making UBT not think it needs to use separate temporary target for non source code projects when EDL settings don't match default. Change 3228601 on 2016/12/09 by Steve.Robb Fix for TSparseArray visualization of types smaller than 8 bytes. Change 3228654 on 2016/12/09 by Gil.Gribb UE4 - Fix very old bug with lock free lists, probably not relevant to anything we currently use. Change3228697on 2016/12/09 by Graeme.Thornton Rebuilt UnrealPak [CL 3228932 by Robert Manuszewski in Main branch]
352 lines
10 KiB
C#
352 lines
10 KiB
C#
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.IO;
|
|
using System.Runtime.Serialization;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace Tools.CrashReporter.CrashReportCommon
|
|
{
|
|
/// <summary>
|
|
/// A class to return the result of the CheckReport web request.
|
|
/// </summary>
|
|
public class CrashReporterResult
|
|
{
|
|
/// <summary>A bool representing success or failure of the CheckReport web request.</summary>
|
|
[XmlAttribute]
|
|
public bool bSuccess = false;
|
|
|
|
/// <summary>An optional integer value typically representing a unique ID.</summary>
|
|
[XmlAttribute]
|
|
public int ID = 0;
|
|
|
|
/// <summary>A optional message to explain any return values.</summary>
|
|
[XmlAttribute]
|
|
public string Message = "";
|
|
}
|
|
|
|
/// <summary>
|
|
/// A class to send to the web service to check to see if the report has already been uploaded.
|
|
/// </summary>
|
|
public class CheckReportRequest
|
|
{
|
|
/// <summary>A unique ID, actually the directory name of the WER.</summary>
|
|
[XmlAttribute]
|
|
public string ReportId = "";
|
|
|
|
/// <summary>LEGACY SUPPORT for crashes reported from clients before CrashReportUploader had been rebuilt</summary>
|
|
[XmlAttribute]
|
|
public string DirectoryName = "";
|
|
|
|
/// <summary>A simple default constructor to allow Xml serialisation.</summary>
|
|
public CheckReportRequest()
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// A class to send to the CrashReport website to add a new crash to the database.
|
|
/// </summary>
|
|
public class CrashDescription
|
|
{
|
|
/// <summary>The type of the crash e.g. crash, assert or ensure. </summary>
|
|
[XmlElement]
|
|
public string CrashType = "";
|
|
|
|
/// <summary>The name of the branch this game was built out of.</summary>
|
|
[XmlElement]
|
|
public string BranchName = "";
|
|
|
|
/// <summary>The name of the game that crashed.</summary>
|
|
[XmlElement]
|
|
public string GameName = "";
|
|
|
|
/// <summary>The platform that crashed e.g. Win64.</summary>
|
|
[XmlElement]
|
|
public string Platform = "";
|
|
|
|
/// <summary>The mode the game was in e.g. editor.</summary>
|
|
[XmlElement]
|
|
public string EngineMode = "";
|
|
|
|
/// <summary>Extended mode info (Vanilla, Dirty, Unset).</summary>
|
|
[XmlElement]
|
|
public string EngineModeEx = "";
|
|
|
|
/// <summary>The four component version of the app e.g. 4.4.1.0</summary>
|
|
[XmlElement]
|
|
public string EngineVersion = "";
|
|
|
|
/// <summary>The four component version of the app e.g. 4.4.1.0</summary>
|
|
[XmlElement]
|
|
public string BuildVersion = "";
|
|
|
|
/// <summary> Changelist number. </summary>
|
|
[XmlElement]
|
|
public int BuiltFromCL = 0;
|
|
|
|
/// <summary>The command line of the application that crashed.</summary>
|
|
[XmlElement]
|
|
public string CommandLine = "";
|
|
|
|
/// <summary>The base directory where the app was running.</summary>
|
|
[XmlElement]
|
|
public string BaseDir = "";
|
|
|
|
/// <summary>The language code the app was running in e.g. 1033.</summary>
|
|
[XmlElement]
|
|
public string Language = "";
|
|
|
|
/// <summary>The language code of the system.</summary>
|
|
[XmlElement]
|
|
public string SystemLanguage = "";
|
|
|
|
/// <summary>
|
|
/// The name of the user that caused this crash.
|
|
/// @UserName varchar(64)
|
|
/// </summary>
|
|
[XmlElement]
|
|
public string UserName = "";
|
|
|
|
/// <summary>
|
|
/// The GUID of the machine the crash occurred on.
|
|
/// @ComputerName varchar(64)
|
|
/// </summary>
|
|
[XmlElement]
|
|
public string MachineGuid = "";
|
|
|
|
/// <summary>
|
|
/// The Epic account ID for the user who last used the Launcher.
|
|
/// @EpicAccountId varchar(64)
|
|
/// </summary>
|
|
[XmlElement]
|
|
public string EpicAccountId = "";
|
|
|
|
/// <summary>An array of strings representing the callstack of the crash.</summary>
|
|
[XmlElement]
|
|
public string[] CallStack = null;
|
|
|
|
/// <summary>An array of strings showing the source code around the crash.</summary>
|
|
[XmlElement]
|
|
public string[] SourceContext = null;
|
|
|
|
/// <summary>An array of strings representing the user description of the crash.</summary>
|
|
[XmlElement]
|
|
public string[] UserDescription = null;
|
|
|
|
/// <summary>A string representing the user activity hint text from the application.</summary>
|
|
[XmlElement]
|
|
public string UserActivityHint = "";
|
|
|
|
/// <summary>The error message, can be assertion message, ensure message or message from the fatal error.</summary>
|
|
[XmlElement]
|
|
public string[] ErrorMessage = null;
|
|
|
|
/// <summary>Crash GUID from the crash context.</summary>
|
|
[XmlElement]
|
|
public string CrashGUID = "";
|
|
|
|
/// <summary>The UTC time the crash occurred.</summary>
|
|
[XmlElement]
|
|
public DateTime TimeofCrash;
|
|
|
|
/// <summary>Whether this crash has a minidump.</summary>
|
|
[XmlElement]
|
|
public bool bHasMiniDump = false;
|
|
|
|
/// <summary>Whether this crash has a log file.</summary>
|
|
[XmlElement]
|
|
public bool bHasLog = false;
|
|
|
|
/// <summary>Obsolete.</summary>
|
|
[XmlElement]
|
|
public bool bHasDiags = false;
|
|
|
|
/// <summary>Obsolete.</summary>
|
|
[XmlElement]
|
|
public bool bHasWERData = false;
|
|
|
|
/// <summary>Whether this crash has a video.</summary>
|
|
[XmlElement]
|
|
public bool bHasVideo = false;
|
|
|
|
/// <summary> Whether the user allowed us to be contacted. </summary>
|
|
[XmlElement]
|
|
public bool bAllowToBeContacted = false;
|
|
|
|
/// <summary> Whether the processor generated an error while generating this crash report </summary>
|
|
[XmlElement]
|
|
public bool bProcessorFailed = false;
|
|
|
|
/// <summary>A simple default constructor to allow Xml serialization.</summary>
|
|
public CrashDescription()
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary> Details about received compressed crash. </summary>
|
|
public class FCompressedCrashInformation
|
|
{
|
|
/// <summary> Size of the compressed data. </summary>
|
|
public string CompressedSize = "";
|
|
|
|
/// <summary> Size of the data after decompression. </summary>
|
|
public string UncompressedSize = "";
|
|
|
|
/// <summary> Number of files stored in the compressed data. </summary>
|
|
public string NumberOfFiles = "";
|
|
|
|
/// <summary>A simple default constructor to allow Xml serialization.</summary>
|
|
public FCompressedCrashInformation()
|
|
{}
|
|
|
|
/// <summary>Initialization constructor.</summary>
|
|
public FCompressedCrashInformation( string InCompressedSize, string InUncompressedSize, string InNumberOfFiles )
|
|
{
|
|
CompressedSize = InCompressedSize;
|
|
UncompressedSize = InUncompressedSize;
|
|
NumberOfFiles = InNumberOfFiles;
|
|
}
|
|
|
|
/// <summary> CompressedSize as int. </summary>
|
|
public int GetCompressedSize()
|
|
{
|
|
int Result = 0;
|
|
int.TryParse( CompressedSize, out Result );
|
|
return Result;
|
|
}
|
|
|
|
/// <summary> UncompressedSize as int. </summary>
|
|
public int GetUncompressedSize()
|
|
{
|
|
int Result = 0;
|
|
int.TryParse( UncompressedSize, out Result );
|
|
return Result;
|
|
}
|
|
|
|
/// <summary> NumberOfFiles as int. </summary>
|
|
public int GetNumberOfFiles()
|
|
{
|
|
int Result = 0;
|
|
int.TryParse( NumberOfFiles, out Result );
|
|
return Result;
|
|
}
|
|
}
|
|
|
|
/// <summary> Helper class for reading binary data. </summary>
|
|
public class FBinaryReaderHelper
|
|
{
|
|
/// <summary> Reads FString serialized with SerializeAsANSICharArray. </summary>
|
|
public static string ReadFixedSizeString( BinaryReader BinaryStream )
|
|
{
|
|
uint Length = BinaryStream.ReadUInt32();
|
|
string Result = new string( BinaryStream.ReadChars( (int)Length ) );
|
|
Result = FixFixedSizeString( Result );
|
|
return Result;
|
|
}
|
|
|
|
static String FixFixedSizeString( string String )
|
|
{
|
|
int RealLength = 0;
|
|
while( String[RealLength++] != '\0' )
|
|
{
|
|
}
|
|
string Result = String.Remove( RealLength - 1 );
|
|
return Result;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Base class for Crash Reporter system exceptions
|
|
/// </summary>
|
|
[Serializable]
|
|
public class CrashReporterException : Exception
|
|
{
|
|
/// <summary>
|
|
/// Default constructor
|
|
/// </summary>
|
|
public CrashReporterException() {}
|
|
|
|
/// <summary>
|
|
/// Construct from an error message
|
|
/// </summary>
|
|
/// <param name="message">The error message</param>
|
|
public CrashReporterException(string message)
|
|
: base(message) {}
|
|
|
|
/// <summary>
|
|
/// Construct from an error message and inner exception
|
|
/// </summary>
|
|
/// <param name="message">The error message</param>
|
|
/// <param name="inner">Inner exception</param>
|
|
public CrashReporterException(string message, Exception inner)
|
|
: base(message, inner) {}
|
|
|
|
/// <summary>
|
|
/// Protected constructor for serialization
|
|
/// </summary>
|
|
/// <param name="info">Serialization info</param>
|
|
/// <param name="context">Streaming context </param>
|
|
protected CrashReporterException(SerializationInfo info, StreamingContext context)
|
|
: base(info, context) {}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Helper class for checking the available space on a storage medium
|
|
/// </summary>
|
|
public static class StorageSpaceHelper
|
|
{
|
|
/// <summary>
|
|
/// Attempts to extract the drive letter including colon and first slash from a file or folder path. Will not throw exceptions on
|
|
/// malformed or illegal paths. Does not currently support UNC paths.
|
|
/// </summary>
|
|
/// <param name="InPath">A folder or file path that starts with a regular drive letter</param>
|
|
/// <param name="OutDriveLetter">(out) If the path starts with a valid drive letter, contains the drive letter, colon and first slash.</param>
|
|
/// <returns>True if the drive letter was return successfully, false if the method fails for any reason.</returns>
|
|
public static bool TryGetDriveLetter(string InPath, out string OutDriveLetter)
|
|
{
|
|
try
|
|
{
|
|
OutDriveLetter = Path.GetPathRoot(InPath);
|
|
return !string.IsNullOrWhiteSpace(OutDriveLetter);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
OutDriveLetter = String.Empty;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// This will work for regular drives with letters. Network shares require Win32 calls
|
|
/// </summary>
|
|
/// <param name="InPath">Filepath (must be in a regular drive with a letter in this version)</param>
|
|
/// <param name="OutSpaceAvailable">(out) The number of bytes free</param>
|
|
/// <param name="OutPercentAvailable">(out) The percentage of free space</param>
|
|
/// <returns>True if the number of free bytes is retrieved successfully, otherwise false if an error occurs.</returns>
|
|
public static bool TryGetSpaceAvailable(string InPath, out Int64 OutSpaceAvailable, out float OutPercentAvailable)
|
|
{
|
|
string PathRoot;
|
|
if (TryGetDriveLetter(InPath, out PathRoot))
|
|
{
|
|
try
|
|
{
|
|
DriveInfo Info = new DriveInfo(PathRoot);
|
|
OutSpaceAvailable = Info.AvailableFreeSpace;
|
|
OutPercentAvailable = 100.0f*OutSpaceAvailable/Info.TotalSize;
|
|
return true;
|
|
}
|
|
catch (Exception)
|
|
{
|
|
// eat exceptions
|
|
}
|
|
}
|
|
|
|
// TODO: fallback on p/invoking platform-specific disk space APIs?
|
|
OutSpaceAvailable = 0;
|
|
OutPercentAvailable = 0.0f;
|
|
return false;
|
|
}
|
|
}
|
|
}
|