mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-24 21:51:49 +01:00
feat: add VectoredExceptionHandler
This commit is contained in:
parent
37275d9397
commit
64ecdb58fd
6 changed files with 490 additions and 5 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
|
@ -21,6 +20,8 @@ using Dalamud.Logging;
|
|||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Plugin.Internal;
|
||||
using Dalamud.Utility;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
using ImGuiNET;
|
||||
using PInvoke;
|
||||
using Serilog.Events;
|
||||
|
|
@ -467,12 +468,24 @@ namespace Dalamud.Interface.Internal
|
|||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
|
||||
if (ImGui.MenuItem("Cause AccessViolation"))
|
||||
ImGui.Separator();
|
||||
|
||||
if (ImGui.MenuItem("Access Violation"))
|
||||
{
|
||||
Marshal.ReadByte(IntPtr.Zero);
|
||||
}
|
||||
|
||||
if (ImGui.MenuItem("Crash game"))
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
var framework = Framework.Instance();
|
||||
framework->UIModule = (UIModule*)0;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
|
||||
if (ImGui.MenuItem("Enable Dalamud testing", string.Empty, configuration.DoDalamudTest))
|
||||
{
|
||||
configuration.DoDalamudTest ^= true;
|
||||
|
|
|
|||
|
|
@ -369,8 +369,7 @@ namespace Dalamud.Interface.Internal
|
|||
if (iniFileInfo.Length > 1200000)
|
||||
{
|
||||
Log.Warning("dalamudUI.ini was over 1mb, deleting");
|
||||
iniFileInfo.CopyTo(Path.Combine(iniFileInfo.DirectoryName,
|
||||
$"dalamudUI-{DateTimeOffset.Now.ToUnixTimeSeconds()}.ini"));
|
||||
iniFileInfo.CopyTo(Path.Combine(iniFileInfo.DirectoryName, $"dalamudUI-{DateTimeOffset.Now.ToUnixTimeSeconds()}.ini"));
|
||||
iniFileInfo.Delete();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue