From fd4d801bfd0668de3bebb216caeb500f0a5baabc Mon Sep 17 00:00:00 2001 From: Keaton Date: Mon, 13 Jan 2025 11:15:05 -0600 Subject: [PATCH 1/3] Various NuGet package updates (#203) Updates the following packages: **nuget: bump the avalonia group with 7 updates** * Bump Avalonia, Avalonia.Controls.DataGrid, Avalonia.Desktop, Avalonia.Diagnostics, and Avalonia.Markup.Xaml.Loader from 11.0.10 to 11.0.13 * Bump Avalonia.Svg and Avalonia.Svg.Skia from 11.0.0.18 to 11.0.0.19 **nuget: bump non-avalonia packages** * Bump Concentus from 2.2.0 to 2.2.2 * Bump Microsoft.IdentityModel.JsonWebTokens from 8.1.2 to 8.3.0 * Bump Silk.NET.Vulkan group with 3 updates (2.21.0 to 2.22.0) * Bump SkiaSharp group with 2 updates (2.88.7 to 2.88.9) --- Directory.Packages.props | 28 +++++++++++++-------------- src/Ryujinx.Graphics.Vulkan/Vendor.cs | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index a480d3d29..c2ac358ed 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,13 +3,13 @@ true - - - - - - - + + + + + + + @@ -18,7 +18,7 @@ - + @@ -26,7 +26,7 @@ - + @@ -48,11 +48,11 @@ - - - - - + + + + + diff --git a/src/Ryujinx.Graphics.Vulkan/Vendor.cs b/src/Ryujinx.Graphics.Vulkan/Vendor.cs index 55ae0cd81..6a2a76a88 100644 --- a/src/Ryujinx.Graphics.Vulkan/Vendor.cs +++ b/src/Ryujinx.Graphics.Vulkan/Vendor.cs @@ -92,7 +92,7 @@ namespace Ryujinx.Graphics.Vulkan DriverId.MesaDozen => "Dozen", DriverId.MesaNvk => "NVK", DriverId.ImaginationOpenSourceMesa => "Imagination (Open)", - DriverId.MesaAgxv => "Honeykrisp", + DriverId.MesaHoneykrisp => "Honeykrisp", _ => id.ToString(), }; } From 017f46f31815262a79f6af1a168527a2b0154b38 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Wed, 15 Jan 2025 03:00:23 -0600 Subject: [PATCH 2/3] HLE: misc: throw a more descriptive error when the loaded processes doesn't contain _latestPid (likely missing FW) --- src/Ryujinx.Common/RyujinxException.cs | 10 +++++++ .../Loaders/Processes/ProcessLoader.cs | 12 +++++++- src/Ryujinx/Program.cs | 30 +++++++++++++++---- 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 src/Ryujinx.Common/RyujinxException.cs diff --git a/src/Ryujinx.Common/RyujinxException.cs b/src/Ryujinx.Common/RyujinxException.cs new file mode 100644 index 000000000..dbb5184e4 --- /dev/null +++ b/src/Ryujinx.Common/RyujinxException.cs @@ -0,0 +1,10 @@ +using System; + +namespace Ryujinx.Common +{ + public class RyujinxException : Exception + { + public RyujinxException(string message) : base(message) + { } + } +} diff --git a/src/Ryujinx.HLE/Loaders/Processes/ProcessLoader.cs b/src/Ryujinx.HLE/Loaders/Processes/ProcessLoader.cs index ebbeb1398..6279ec3b4 100644 --- a/src/Ryujinx.HLE/Loaders/Processes/ProcessLoader.cs +++ b/src/Ryujinx.HLE/Loaders/Processes/ProcessLoader.cs @@ -26,7 +26,17 @@ namespace Ryujinx.HLE.Loaders.Processes private ulong _latestPid; - public ProcessResult ActiveApplication => _processesByPid[_latestPid]; + public ProcessResult ActiveApplication + { + get + { + if (!_processesByPid.TryGetValue(_latestPid, out ProcessResult value)) + throw new RyujinxException( + $"The HLE Process map did not have a process with ID {_latestPid}. Are you missing firmware?"); + + return value; + } + } public ProcessLoader(Switch device) { diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index 6f0f3e12e..b9aa402c5 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -21,6 +21,7 @@ using Ryujinx.Graphics.Vulkan.MoltenVK; using Ryujinx.Headless; using Ryujinx.SDL2.Common; using System; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -243,16 +244,33 @@ namespace Ryujinx.Ava : $"Launch Mode: {AppDataManager.Mode}"); } - internal static void ProcessUnhandledException(object sender, Exception ex, bool isTerminating) + internal static void ProcessUnhandledException(object sender, Exception initialException, bool isTerminating) { Logger.Log log = Logger.Error ?? Logger.Notice; - string message = $"Unhandled exception caught: {ex}"; - // ReSharper disable once ConstantConditionalAccessQualifier - if (sender?.GetType()?.AsPrettyString() is { } senderName) - log.Print(LogClass.Application, message, senderName); + List exceptions = []; + + if (initialException is AggregateException ae) + { + exceptions.AddRange(ae.InnerExceptions); + } else - log.PrintMsg(LogClass.Application, message); + { + exceptions.Add(initialException); + } + + foreach (var e in exceptions) + { + string message = $"Unhandled exception caught: {e}"; + // ReSharper disable once ConstantConditionalAccessQualifier + if (sender?.GetType()?.AsPrettyString() is { } senderName) + log.Print(LogClass.Application, message, senderName); + else + log.PrintMsg(LogClass.Application, message); + } + + + if (isTerminating) Exit(); From c17e3bfcdfbb46f2bc904964441a1503c72c73cc Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Wed, 15 Jan 2025 03:01:04 -0600 Subject: [PATCH 3/3] genuinely dont know how that was still there, i thought i got rid of UI.Common --- .../Ryujinx.UI.Common.csproj | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj diff --git a/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj b/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj deleted file mode 100644 index 01efe04ba..000000000 --- a/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - true - $(DefaultItemExcludes);._* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -