acdream/src/AcDream.App
Erik 67379d1f9a
Some checks are pending
Headless portability / portable-headless (ubuntu-latest) (push) Waiting to run
Headless portability / portable-headless (windows-latest) (push) Waiting to run
Headless portability / linux-graphical (push) Waiting to run
Headless portability / linux-vulkan (push) Waiting to run
fix(ui): UiField wrapped-line cache coherent with the text at mouse-hit time
Fixes the crash the user hit twice today (captured in
artifacts/coldeve-acceptance-20260729/crash-hunt.log): clicking into a
multiline UiField - the examination window's inscription field - after
the text had changed since the last draw threw an unhandled
ArgumentOutOfRangeException from String.Substring and took the whole
client down (UiField.MeasureRange <- HitChar <- OnEvent MouseDown).

Root cause: _wrappedLines is a DRAW-side cache (rebuilt only in
DrawMultiLine) consumed by the INPUT side (HitChar on MouseDown and
drag-select MouseMove). Input events are pumped before the frame's
draw, so a mutation (backspace, SetText, paste) followed by a click in
the same pumped frame handed HitChar wrap lines describing the OLD,
longer text; measuring those stale ranges ran past the end of the live
string.

Fix: text mutations now bump a version (the _text field became a
private property so every existing mutation site participates without
churn), the draw records which version its wrap lines describe, and
HitChar proves coherence via EnsureWrappedLinesCurrent() - rebuilding
with the last draw width when stale. Rebuilding rather than clamping
keeps caret placement CORRECT against the live text, not merely
non-throwing. Two inversion-sensitive regression tests reproduce the
exact crash sequence (wrap long text, shrink without a draw, click);
they throw without the HitChar coherence call.

App tests 3,962 passed / 3 skipped (3,960 + 2 new).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:38:52 +02:00
..
Audio Revert "Campaign V slice V4a" - it lost world multisampling 2026-07-27 18:29:28 +02:00
Combat refactor(runtime): close simulation ownership 2026-07-26 15:53:31 +02:00
Composition feat(interaction): Slice 4 - equipped-child world picking 2026-07-29 18:30:25 +02:00
Diagnostics feat(render): Vulkan campaign V11 step 3 — drop the GL packages and shaders 2026-07-29 02:58:15 +02:00
Input feat(render): Campaign V slice V11 commit 1 - delete ImGui, Studio, and the DevTools frontend 2026-07-28 23:56:04 +02:00
Interaction fix(interaction): port retail's wielded-item pickup rejection (Slice 4 F1) 2026-07-29 19:09:38 +02:00
Net feat(headless): hydrate isolated collision worlds 2026-07-27 09:25:58 +02:00
Physics feat(core): adopt retail's full WeenieError code table 2026-07-29 07:33:27 +02:00
Platform feat(render): Vulkan campaign V11 step 2 — delete the OpenGL backend 2026-07-29 02:19:53 +02:00
Plugins Revert "Campaign V slice V4a" - it lost world multisampling 2026-07-27 18:29:28 +02:00
Rendering diag(render): composite-warmup stall probe for the session-3 tunnel hang 2026-07-29 10:28:52 +02:00
Runtime diag(net): #260 outbound/command-gate probe + corrected issue framing 2026-07-29 08:53:58 +02:00
Settings feat(render): Campaign V slice V6h — the Vulkan composition host 2026-07-28 11:47:37 +02:00
Spells Revert "Campaign V slice V4a" - it lost world multisampling 2026-07-27 18:29:28 +02:00
Streaming Revert "Campaign V slice V4a" - it lost world multisampling 2026-07-27 18:29:28 +02:00
UI fix(ui): UiField wrapped-line cache coherent with the text at mouse-hit time 2026-07-29 19:38:52 +02:00
Update refactor(runtime): cut graphical host over to canonical root 2026-07-26 19:06:09 +02:00
World feat(interaction): Slice 4 - equipped-child world picking 2026-07-29 18:30:25 +02:00
AcDream.App.csproj feat(render): Vulkan campaign V11 step 3 — drop the GL packages and shaders 2026-07-29 02:58:15 +02:00
GlobalUsings.cs Revert "Campaign V slice V4a" - it lost world multisampling 2026-07-27 18:29:28 +02:00
Program.cs feat(render): Campaign V slice V11 commit 1 - delete ImGui, Studio, and the DevTools frontend 2026-07-28 23:56:04 +02:00
RuntimeOptions.cs feat(render): Vulkan campaign V11 step 2 — delete the OpenGL backend 2026-07-29 02:19:53 +02:00