mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-13 13:37:00 +00:00
Merge branch 'exception-minidump' into 'master'
Create minidump at ProcessUnhandledException See merge request [ryubing/ryujinx!217](https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/217)
This commit is contained in:
commit
4288fc4148
2 changed files with 29 additions and 0 deletions
|
|
@ -510,6 +510,11 @@ namespace Ryujinx.HLE.HOS
|
|||
}
|
||||
}
|
||||
|
||||
public string DebugGetApplicationProcessMinidump()
|
||||
{
|
||||
return DebugGetApplicationProcess()?.Debugger?.GetMinidump();
|
||||
}
|
||||
|
||||
internal KProcess DebugGetApplicationProcess()
|
||||
{
|
||||
lock (KernelContext.Processes)
|
||||
|
|
|
|||
|
|
@ -382,6 +382,30 @@ namespace Ryujinx.Ava
|
|||
exceptions.Add(initialException);
|
||||
}
|
||||
|
||||
if (isTerminating && HLE.Switch.Shared is { } device)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Print a short message first just in case it crashes again during minidump creation (should not happen)
|
||||
Logger.Error?.Print(LogClass.Application, $"Unhandled exception caught: {initialException.GetType().Name}. Creating guest program minidump...");
|
||||
|
||||
var minidump = device.System?.DebugGetApplicationProcessMinidump();
|
||||
|
||||
if (minidump == null)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Application, "Failed to create minidump");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Info?.Print(LogClass.Application, minidump);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Application, $"Failed to create minidump: {e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Exception e in exceptions)
|
||||
{
|
||||
string message = $"Unhandled exception caught: {e}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue