diff --git a/src/BUTR.CrashReport.Renderer.Html/CrashReportHtml.cs b/src/BUTR.CrashReport.Renderer.Html/CrashReportHtml.cs
index 21c4e33..8498ecc 100644
--- a/src/BUTR.CrashReport.Renderer.Html/CrashReportHtml.cs
+++ b/src/BUTR.CrashReport.Renderer.Html/CrashReportHtml.cs
@@ -309,7 +309,7 @@ private static void AddInvolvedPlugins(CrashReportModel crashReport, StringBuild
private static string GetInvolvedHtml(CrashReportModel crashReport)
{
var sb = new StringBuilder();
- sb.Append("Based on Stacktrace:")
+ sb.Append("Based on Stacktrace (From highest probability to lowest):")
.Append("
");
AddInvolvedModules(crashReport, sb);
AddInvolvedPlugins(crashReport, sb);
diff --git a/src/BUTR.CrashReport.Renderer.ImGui/Renderer/ImGuiRenderer.4.InvolvedModulesAndPlugins.cs b/src/BUTR.CrashReport.Renderer.ImGui/Renderer/ImGuiRenderer.4.InvolvedModulesAndPlugins.cs
index 858b911..66af009 100644
--- a/src/BUTR.CrashReport.Renderer.ImGui/Renderer/ImGuiRenderer.4.InvolvedModulesAndPlugins.cs
+++ b/src/BUTR.CrashReport.Renderer.ImGui/Renderer/ImGuiRenderer.4.InvolvedModulesAndPlugins.cs
@@ -5,7 +5,6 @@
using ImGuiNET;
-using System;
using System.Collections.Generic;
using System.Linq;
@@ -146,7 +145,7 @@ private void RenderInvolvedPlugins()
private void RenderInvolvedModulesAndPlugins()
{
- _imgui.Text("Based on Stacktrace:\0"u8);
+ _imgui.Text("Based on Stacktrace (From highest probability to lowest):\0"u8);
_imgui.Indent();
RenderInvolvedModules();
RenderInvolvedPlugins();
diff --git a/src/BUTR.CrashReport.Renderer.ImGui/Renderer/ImGuiRenderer.9.LogFiles.cs b/src/BUTR.CrashReport.Renderer.ImGui/Renderer/ImGuiRenderer.9.LogFiles.cs
index bfae2f8..bfdc540 100644
--- a/src/BUTR.CrashReport.Renderer.ImGui/Renderer/ImGuiRenderer.9.LogFiles.cs
+++ b/src/BUTR.CrashReport.Renderer.ImGui/Renderer/ImGuiRenderer.9.LogFiles.cs
@@ -5,8 +5,6 @@
using ImGuiNET;
-using System;
-
namespace BUTR.CrashReport.Renderer.ImGui.Renderer;
partial class ImGuiRenderer
diff --git a/src/BUTR.CrashReport/Utils/CrashReportModelUtils.cs b/src/BUTR.CrashReport/Utils/CrashReportModelUtils.cs
index 8d9c30b..b4381d7 100644
--- a/src/BUTR.CrashReport/Utils/CrashReportModelUtils.cs
+++ b/src/BUTR.CrashReport/Utils/CrashReportModelUtils.cs
@@ -144,17 +144,31 @@ static bool IsProtected(AssemblyModel? assembly) => assembly is not null &&
public static List GetInvolvedModules(CrashReportInfo crashReport)
{
var involvedModels = new List();
- foreach (var stacktrace in crashReport.FilteredStacktrace.GroupBy(m => m.ModuleInfo))
+ foreach (var stacktraces in crashReport.FilteredStacktrace.GroupBy(m => m.ModuleInfo))
{
- var module = stacktrace.Key;
- if (module is null) continue;
-
- involvedModels.Add(new()
+ if (stacktraces.Key is { } module)
{
- ModuleOrLoaderPluginId = module.Id,
- EnhancedStacktraceFrameName = stacktrace.Last().StackFrameDescription,
- AdditionalMetadata = Array.Empty(),
- });
+ involvedModels.Add(new()
+ {
+ ModuleOrLoaderPluginId = module.Id,
+ EnhancedStacktraceFrameName = stacktraces.Last().StackFrameDescription,
+ AdditionalMetadata = Array.Empty(),
+ });
+ }
+ }
+ foreach (var stacktrace in crashReport.FilteredStacktrace)
+ {
+ foreach (var patch in stacktrace.PatchMethods)
+ {
+ if (patch.ModuleInfo is null) continue;
+
+ involvedModels.Add(new()
+ {
+ ModuleOrLoaderPluginId = patch.ModuleInfo.Id,
+ EnhancedStacktraceFrameName = stacktrace.StackFrameDescription,
+ AdditionalMetadata = Array.Empty(),
+ });
+ }
}
return involvedModels;
}
@@ -165,17 +179,31 @@ public static List GetInvolvedModules(CrashReportIn
public static List GetInvolvedPlugins(CrashReportInfo crashReport)
{
var involvedPluginModels = new List();
- foreach (var stacktrace in crashReport.FilteredStacktrace.GroupBy(m => m.LoaderPluginInfo))
+ foreach (var stacktraces in crashReport.FilteredStacktrace.GroupBy(m => m.LoaderPluginInfo))
{
- var loaderPlugin = stacktrace.Key;
- if (loaderPlugin is null) continue;
-
- involvedPluginModels.Add(new()
+ if (stacktraces.Key is { } loaderPlugin)
{
- ModuleOrLoaderPluginId = loaderPlugin.Id,
- EnhancedStacktraceFrameName = stacktrace.Last().StackFrameDescription,
- AdditionalMetadata = Array.Empty(),
- });
+ involvedPluginModels.Add(new()
+ {
+ ModuleOrLoaderPluginId = loaderPlugin.Id,
+ EnhancedStacktraceFrameName = stacktraces.Last().StackFrameDescription,
+ AdditionalMetadata = Array.Empty(),
+ });
+ }
+ }
+ foreach (var stacktrace in crashReport.FilteredStacktrace)
+ {
+ foreach (var patch in stacktrace.PatchMethods)
+ {
+ if (patch.LoaderPluginInfo is null) continue;
+
+ involvedPluginModels.Add(new()
+ {
+ ModuleOrLoaderPluginId = patch.LoaderPluginInfo.Id,
+ EnhancedStacktraceFrameName = stacktrace.StackFrameDescription,
+ AdditionalMetadata = Array.Empty(),
+ });
+ }
}
return involvedPluginModels;
}