chore(release): update version to 2026.10.4.22 and modify related files

- Updated last-built-version to 2026.10.4.22.
- Modified last-release-manifest.json to reflect new version, release number, and updated changelog entries.
- Added ImGuiNativeHandle property in EntryPoint.cs.
- Implemented ImGuiStackRecovery in EngineFrameController.cs and ImGuiController.cs to handle plugin errors during frame rendering.
This commit is contained in:
BlankenshipG 2026-10-05 12:38:38 -04:00
commit b5ab12c75f
6 changed files with 137 additions and 27 deletions

View file

@ -1 +1 @@
2026.10.4.18
2026.10.4.22

View file

@ -1,24 +1,24 @@
{
"schema": 1,
"product": "RynthCore + RynthSuite",
"version": "2026.10.4.18",
"release": 2026100418,
"builtUtc": "2026-10-05T01:15:49Z",
"previous": "2026.10.4.17",
"version": "2026.10.4.22",
"release": 2026100422,
"builtUtc": "2026-10-05T05:05:36Z",
"previous": "2026.10.4.21",
"installer": {
"file": "RynthCore-Setup-2026.10.4.18.exe",
"size": 108546627,
"sha256": "70f6a3c0ebe1c279d60e48c739e4664f8ce625b9aa5d055283b2c207219acf26"
"file": "RynthCore-Setup-2026.10.4.22.exe",
"size": 108550595,
"sha256": "9e29c47918dfae7cbcf6def51386e55d9ecb9b7d410d9e2fea5d29ce86911379"
},
"source": {
"rynthCore": {
"branch": "SK-local",
"commit": "75a1f63c6893a8c9577c697a224f44bd942ea768",
"commit": "ae775110769b1367288ff8979525bbb3a1a55535",
"dirty": false
},
"rynthSuite": {
"branch": "SK-local",
"commit": "0c3800294ce07e5ebf25cd83d28ba7ea0039baf1",
"commit": "dc9b6a48849161866d90a252303b6ff9b2d610b2",
"dirty": false
}
},
@ -26,72 +26,71 @@
{
"name": "Launcher (RynthCore.exe)",
"file": "core\\RynthCore.exe",
"version": "2026.10.4.18+75a1f63c6893a8c9577c697a224f44bd942ea768"
"version": "2026.10.4.22+ae775110769b1367288ff8979525bbb3a1a55535"
},
{
"name": "Engine",
"file": "core\\Runtime\\RynthCore.Engine.dll",
"version": "2026.10.4.18+75a1f63c6893a8c9577c697a224f44bd942ea768"
"version": "2026.10.4.22+ae775110769b1367288ff8979525bbb3a1a55535"
},
{
"name": "Loader",
"file": "core\\Runtime\\RynthCore.Loader.dll",
"version": "2026.10.4.18+75a1f63c6893a8c9577c697a224f44bd942ea768"
"version": "2026.10.4.22+ae775110769b1367288ff8979525bbb3a1a55535"
},
{
"name": "Loot Editor",
"file": "core\\Tools\\LootEditor\\RynthCore.LootEditor.exe",
"version": "2026.10.4.18+0c3800294ce07e5ebf25cd83d28ba7ea0039baf1"
"version": "2026.10.4.22+dc9b6a48849161866d90a252303b6ff9b2d610b2"
},
{
"name": "RynthAi plugin",
"file": "suite\\RynthAi\\RynthCore.Plugin.RynthAi.dll",
"version": "0.6.23-legacy-ui+0c3800294ce07e5ebf25cd83d28ba7ea0039baf1"
"version": "0.6.32-legacy-ui+dc9b6a48849161866d90a252303b6ff9b2d610b2"
},
{
"name": "Monster Editor",
"file": "suite\\RynthAi\\MonsterEditor\\RynthCore.MonsterEditor.exe",
"version": "2026.10.4.18+0c3800294ce07e5ebf25cd83d28ba7ea0039baf1"
"version": "2026.10.4.22+dc9b6a48849161866d90a252303b6ff9b2d610b2"
},
{
"name": "RynthChat (experimental)",
"file": "suite\\RynthChat\\RynthCore.Plugin.RynthChat.dll",
"version": "0.1.1-experimental+0c3800294ce07e5ebf25cd83d28ba7ea0039baf1"
"version": "0.1.1-experimental+dc9b6a48849161866d90a252303b6ff9b2d610b2"
},
{
"name": "RynthJuice (experimental)",
"file": "suite\\RynthJuice\\RynthCore.Plugin.RynthJuice.dll",
"version": "0.1.2-experimental+0c3800294ce07e5ebf25cd83d28ba7ea0039baf1"
"version": "0.1.2-experimental+dc9b6a48849161866d90a252303b6ff9b2d610b2"
},
{
"name": "RynthNav (experimental)",
"file": "suite\\RynthNav\\RynthCore.Plugin.RynthNav.dll",
"version": "0.5.5-experimental+0c3800294ce07e5ebf25cd83d28ba7ea0039baf1"
"version": "0.5.5-experimental+dc9b6a48849161866d90a252303b6ff9b2d610b2"
},
{
"name": "RynthTracker (experimental)",
"file": "suite\\RynthTracker\\RynthCore.Plugin.RynthTracker.dll",
"version": "0.1.1-experimental+0c3800294ce07e5ebf25cd83d28ba7ea0039baf1"
"version": "0.1.1-experimental+dc9b6a48849161866d90a252303b6ff9b2d610b2"
},
{
"name": "RynthVision (experimental)",
"file": "suite\\RynthVision\\RynthCore.Plugin.RynthVision.dll",
"version": "0.1.1-experimental+0c3800294ce07e5ebf25cd83d28ba7ea0039baf1"
"version": "0.1.1-experimental+dc9b6a48849161866d90a252303b6ff9b2d610b2"
},
{
"name": "UbRythai (experimental)",
"file": "suite\\UbRythai\\RynthCore.Plugin.UbRythai.dll",
"version": "3.1.10+0c3800294ce07e5ebf25cd83d28ba7ea0039baf1"
"version": "3.1.10+dc9b6a48849161866d90a252303b6ff9b2d610b2"
}
],
"changelog": [
"RynthCore/Changelog/2026-10-04-floating-huds.md",
"RynthCore/Changelog/2026-10-04-ilt-hub-pet-roster.md",
"RynthCore/Changelog/2026-10-04-installer-2026.10.4.17-release.md"
"RynthCore/Changelog/2026-10-05-chat-translation.md",
"RynthCore/Changelog/2026-10-05-installer-2026.10.4.21-release.md"
],
"changelogSince": {
"rynthCore": "b90e49486fae2a530dcf4f414c1c5d3057636e38",
"rynthSuite": "a6ab2f86a3dae774bda650a60b32e4e3a2b4f61b",
"rynthCore": "51307657d971ff81c61aa6532fb1ad941c54ca7f",
"rynthSuite": "a7754b972b26a78a2e28f3d0938c68e522cea0af",
"date": ""
}
}

View file

@ -40,6 +40,10 @@ public static class EntryPoint
private static int _initCount;
private static bool _imGuiResolverConfigured;
private static IntPtr _imGuiNativeHandle;
/// <summary>Module handle of the loaded cimgui DLL (zero until the ImGui resolver is configured).</summary>
internal static IntPtr ImGuiNativeHandle => _imGuiNativeHandle;
private static readonly object LogLock = new();
private static readonly Queue<string> RecentLogLines = new();

View file

@ -601,6 +601,10 @@ internal static class EngineFrameController
RynthLog.Info($"EngineFrameController: ImGui branch = {(branch == 1 ? "shell (RenderAll)" : branch == 2 ? "overlay windows (RenderOverlayAll)" : "none (shell and overlay windows both off)")}.");
}
// A plugin that threw mid-window leaves scopes open; EndFrame would assert
// with a modal dialog on AC's main thread.
if (branch != 0) ImGuiStackRecovery.RecoverBeforeEndFrame();
bool captureMouse =
ImGuiNET.ImGui.IsWindowHovered(ImGuiHoveredFlags.AnyWindow) ||
ImGuiNET.ImGui.IsAnyItemActive();

View file

@ -273,6 +273,10 @@ internal static class ImGuiController
// Plugin render (ImGui draw calls)
PluginManager.RenderAll();
// A plugin that threw mid-window leaves scopes open; EndFrame would assert
// with a modal dialog on AC's main thread.
ImGuiStackRecovery.RecoverBeforeEndFrame();
bool captureMouse =
ImGuiNET.ImGui.IsWindowHovered(ImGuiHoveredFlags.AnyWindow) ||
ImGuiNET.ImGui.IsAnyItemActive();

View file

@ -0,0 +1,99 @@
// ============================================================================
// RynthCore.Engine - ImGuiStackRecovery.cs
//
// Closes ImGui scopes a plugin left open when it threw mid-frame (Begin without
// End, BeginTable without EndTable, unpopped IDs / style vars, ...).
//
// The shipped cimgui (Dear ImGui 1.89.7, static CRT, asserts on) reports a
// mismatched stack at EndFrame through IM_ASSERT, which shows a modal
// MessageBoxA on AC's main thread. The client then freezes until the hang
// watchdog kills it. ImGui's own recovery routine,
// ErrorCheckEndFrameRecover, unwinds everything down to the implicit fallback
// window; it is documented as safe to call right before EndFrame.
//
// 1.89.7 has no io.ConfigErrorRecovery* fields, so ImGui.NET's 1.91 IO layout
// must not be used to switch the assert off; the export is called directly.
// ============================================================================
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace RynthCore.Engine.ImGuiBackend;
internal static unsafe class ImGuiStackRecovery
{
[DllImport("kernel32.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
private static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
// void igErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, void* user_data)
private static delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> _recover;
private static bool _resolved;
private static bool _loggedUnavailable;
private static int _recoveredThisFrame;
private static long _totalRecovered;
private static long _nextLogAtMs;
private static string _lastMessage = string.Empty;
/// <summary>Scopes closed since the engine started.</summary>
internal static long TotalRecovered => _totalRecovered;
/// <summary>
/// Unwinds any ImGui scope still open at the end of plugin rendering. Must be
/// called on the render thread, with the engine's context current, outside
/// every Begin the caller itself opened (i.e. right before EndFrame).
/// </summary>
internal static void RecoverBeforeEndFrame()
{
if (!_resolved) Resolve();
if (_recover == null) return;
_recoveredThisFrame = 0;
_recover((IntPtr)(delegate* unmanaged[Cdecl]<IntPtr, byte*, byte*, void>)&OnRecovered, IntPtr.Zero);
if (_recoveredThisFrame == 0) return;
_totalRecovered += _recoveredThisFrame;
long now = Environment.TickCount64;
if (now < _nextLogAtMs) return;
_nextLogAtMs = now + 10_000;
RynthLog.Warn($"ImGuiStackRecovery: closed {_recoveredThisFrame} ImGui scope(s) a plugin left open "
+ $"(total {_totalRecovered}); last: {_lastMessage}");
}
private static void Resolve()
{
_resolved = true;
IntPtr module = EntryPoint.ImGuiNativeHandle;
IntPtr fn = module != IntPtr.Zero ? GetProcAddress(module, "igErrorCheckEndFrameRecover") : IntPtr.Zero;
_recover = (delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void>)fn;
if (fn == IntPtr.Zero && !_loggedUnavailable)
{
_loggedUnavailable = true;
RynthLog.Warn("ImGuiStackRecovery: igErrorCheckEndFrameRecover not exported by cimgui; plugin frame errors can still assert.");
}
else if (fn != IntPtr.Zero)
{
RynthLog.Info($"ImGuiStackRecovery: armed (igErrorCheckEndFrameRecover @ 0x{fn:X8}).");
}
}
// ImGuiErrorLogCallback is variadic cdecl (caller cleans the stack). Every recovery
// message in 1.89.7 carries exactly one %s (the window name), so the first variadic
// argument is read as a third fixed parameter.
[UnmanagedCallersOnly(CallConvs = new[] { typeof(CallConvCdecl) })]
private static void OnRecovered(IntPtr userData, byte* fmt, byte* arg)
{
try
{
_recoveredThisFrame++;
string format = fmt != null ? Marshal.PtrToStringAnsi((IntPtr)fmt) ?? string.Empty : string.Empty;
string name = arg != null ? Marshal.PtrToStringAnsi((IntPtr)arg) ?? string.Empty : string.Empty;
_lastMessage = format.Replace("%s", name);
}
catch
{
// Never let a managed exception unwind into native ImGui.
}
}
}