Engine robustness: appraisal merge, AutoId re-eligibility, freeze pause, OOM dump, crash logger, transition gate
Appraisals - RequestId slot merges a pending request for the same object (PendingIdQueue), as the QueryHealth slot does. - AutoId: per-object last-sent time kept across client releases; no re-appraisal within 10 min while the data is cached, unless the server deleted the object (0xF747). Map bounded at 8192 with a prune off the create path. The sent mark is set at the real send in DrainRequestIds, not at queue time. - The selected-target priority appraisal is skipped when its data is cached and fresh. Main thread frozen - Plugin ticks pause while AC's main thread is frozen (a main-thread message box, or no beat for the hang watchdog's threshold); events keep flowing. Exposed through GetEngineStatusJson (mainThreadFrozen, mainThreadStallMs, pluginTicksPausedMs) and the heartbeat (pump=paused). Crashes - AC's OUT OF MEMORY box: one full-memory dump to <install>\Dumps before the box shows, newest 3 kept. - Native crash logger: pid, tid and date per entry; once per address; .NET Framework AVs never charged to the limit; last-chance handler; stack overflow and heap corruption codes. Build-SehTrampoline gains -NoDeploy. - ProcessExitHooks: dead fail-fast detours removed; crash exit codes pass straight through TerminateProcess/NtTerminateProcess. - CoreCLR's own crash dump is left to the loader's existing ConfigureCrashDumps (Loader.c, Logs\dumps\clr_*.dmp) and Publish-EngineCoreClr's createdump/DAC handling; this change adds no second setup. World transitions - AcMainThreadQueue holds queued game-mutating work while the player is dead, in portal space, or within 5 s after either or after a non-adjacent landblock jump. When the window ends, stale casts, uses, selects and appraisals are dropped and stops and cancels run in order. Walking across an adjacent landblock border never gates. State is re-sampled after AC's tick, before the post-tick drain. - Inventory panel actions are held during a transition too. Diagnostics - Heartbeat valargest= (largest free VA block); free and largest logged before and after each plugin load and unload. - CastSpell comments corrected to the actual main-thread paths. Tests - tools\EngineRobustnessTests and native\SehTrampoline\tests\CrashLogFilterTests.c. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b0f9d74b21
commit
55f7497065
30 changed files with 2202 additions and 419 deletions
|
|
@ -507,21 +507,20 @@ internal static class CombatActionHooks
|
|||
if (!MainThreadGuard.IsOnMainThread())
|
||||
return AcMainThreadQueue.EnqueueCast(targetId, (uint)spellId);
|
||||
|
||||
// Call ClientMagicSystem::CastSpell directly off the plugin pump thread.
|
||||
// This is the proven-working casting path (buffs + combat resolve in
|
||||
// chat). The earlier EndScene-marshalled variant (AcMainThreadQueue,
|
||||
// drained from OnEndScene) was REVERTED 2026-05-19: EndScene fires AC's
|
||||
// IncrementBusyCount but is not the context that drives the cast state
|
||||
// machine to completion, so combat casts never produced a projectile /
|
||||
// damage / "You cast" chat — busy leaked, AC's single cast slot jammed
|
||||
// "Casting <spell>" client-wide, and even manual casting died. Do NOT
|
||||
// re-introduce queue/EndScene marshalling for casts.
|
||||
// The documented object-teardown AV (0x0055FA24 [null+0x40] /
|
||||
// 0x00416C86 [null+0x28]) is contained per-callsite by the SEH
|
||||
// trampoline below (__try/__except in RynthCore.SehTrampoline.dll),
|
||||
// which is the correct fix for that AV. AC's CastSpell reads its
|
||||
// "currently selected target" when targetIsSelected=1; SelectItem
|
||||
// first so AC's selection matches the caller's intent.
|
||||
// From here on we are ON AC's main thread: the Client::UseTime cast drain
|
||||
// (AcMainThreadQueue.DrainCasts, before AC's tick) or another main-thread caller.
|
||||
// Nothing below runs on the plugin pump. What was REVERTED earlier is the
|
||||
// EndScene drain for casts: EndScene is not the context that drives the cast state
|
||||
// machine to completion (busy leaked, AC's single cast slot jammed client-wide);
|
||||
// EngineFrameController's EndScene drain still never runs casts.
|
||||
// Two native paths, each through the SEH trampoline (__try/__except in
|
||||
// RynthCore.SehTrampoline.dll), which contains the object-teardown AV
|
||||
// (0x0055FA24 [null+0x40] / 0x00416C86 [null+0x28]) per call:
|
||||
// targeted (targetId != 0): GetMagicSystem() -> FreeHandsAndCastSpell(mgr, spell,
|
||||
// target), the target passed explicitly, NO SelectItem;
|
||||
// self (targetId == 0): ClientMagicSystem::CastSpell(spell, targetIsSelected=0).
|
||||
// While the player is dead, portaling or settling after a landblock jump the drain
|
||||
// holds the cast and drops it once the transition ends (WorldTransitionState).
|
||||
if (_castSpellClient != null)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Reference in a new issue