You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Add thread callstacks to android crash reports
- Add per thread stack walk functionality. - Add functionality to android crash context to use all thread manager thread's callstacks. - Before report upload, add all thread xml data into crash report - tidy up signal handler's separate stack behaviour. it is now shared by both fatal signal and thread backtrace signal. #rb Jack.Porter [FYI] Chris.Babcock, Brandon.Schaefer #rnx #ROBOMERGE-SOURCE: CL 10410010 via CL 10410020 via CL 10410025 #ROBOMERGE-BOT: (v594-10333955) [CL 10410026 by allan bentham in Main branch]
This commit is contained in:
@@ -27,4 +27,32 @@ void FAndroidErrorReport::ShutDown()
|
||||
AndroidErrorReport::CrashHelperModule->ShutdownModule();
|
||||
}
|
||||
|
||||
static void AddThreadContexts(const FString& ReportDirectory)
|
||||
{
|
||||
// Try to load the callstacks file.
|
||||
const FString ThreadContextsFile(ReportDirectory / TEXT("AllThreads.txt"));
|
||||
IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
|
||||
|
||||
if (PlatformFile.FileExists(*ThreadContextsFile))
|
||||
{
|
||||
// rename the threads file, if anything goes wrong during processing it will be skipped on the next run.
|
||||
const FString ThreadContextsFileTemp(ReportDirectory / TEXT("AllThreads.tmp"));
|
||||
PlatformFile.MoveFile(*ThreadContextsFileTemp, *ThreadContextsFile);
|
||||
|
||||
FXmlFile ThreadsNode(ThreadContextsFileTemp);
|
||||
if (ThreadsNode.IsValid())
|
||||
{
|
||||
FPrimaryCrashProperties::Get()->Threads = ThreadsNode.GetRootNode();
|
||||
// delete the file as it has been added to the primary report.
|
||||
PlatformFile.DeleteFile(*ThreadContextsFileTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FText FAndroidErrorReport::DiagnoseReport() const
|
||||
{
|
||||
AddThreadContexts(ReportDirectory);
|
||||
return FText();
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
@@ -93,6 +93,20 @@ int64 FCrashProperty::AsInt64() const
|
||||
return Value;
|
||||
}
|
||||
|
||||
FCrashPropertyXmlNode::FCrashPropertyXmlNode(const FString& InMainCategory, const FString& InSecondCategory, FPrimaryCrashProperties* InOwner)
|
||||
: Owner(InOwner)
|
||||
, MainCategory(InMainCategory)
|
||||
, SecondCategory(InSecondCategory)
|
||||
, bSet(false)
|
||||
{ }
|
||||
|
||||
FCrashPropertyXmlNode& FCrashPropertyXmlNode::operator=(const FXmlNode* Node)
|
||||
{
|
||||
bSet = true;
|
||||
Owner->SetCrashProperty(MainCategory, SecondCategory, Node);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
FPrimaryCrashProperties
|
||||
-----------------------------------------------------------------------------*/
|
||||
@@ -122,6 +136,7 @@ FPrimaryCrashProperties::FPrimaryCrashProperties()
|
||||
, PlatformCallbackResult(FGenericCrashContext::PlatformPropertiesTag, TEXT("PlatformCallbackResult"), this)
|
||||
, CrashReportClientVersion(FGenericCrashContext::RuntimePropertiesTag, TEXT("CrashReportClientVersion"), this)
|
||||
, CPUBrand(FGenericCrashContext::RuntimePropertiesTag, TEXT("CPUBrand"), this)
|
||||
, Threads(FGenericCrashContext::RuntimePropertiesTag, TEXT("Threads"), this)
|
||||
, bIsOOM(false)
|
||||
, bLowMemoryWarning(false)
|
||||
, bInBackground(false)
|
||||
|
||||
Reference in New Issue
Block a user