|
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
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> |
||
|---|---|---|
| .. | ||
| Layout | ||
| AutoWieldGenerationTests.cs | ||
| ClientCommandControllerTests.cs | ||
| ControlsIniTests.cs | ||
| CursorFeedbackControllerTests.cs | ||
| DatWidgetFactoryZOrderTests.cs | ||
| DragDropSpineTests.cs | ||
| GameplayConfirmationControllerTests.cs | ||
| IconComposerTests.cs | ||
| ItemInteractionControllerTests.cs | ||
| LayoutImporterMountTests.cs | ||
| MarkupDocumentTests.cs | ||
| PortalWaitNoticeControllerTests.cs | ||
| RetailCursorCatalogTests.cs | ||
| RetailCursorManagerTests.cs | ||
| RetailItemConfirmationControllerTests.cs | ||
| RetailSkillTrainingConfirmationControllerTests.cs | ||
| RetailUiAutomationProbeTests.cs | ||
| RetailUiInteractionFlowTests.cs | ||
| RetailUiRuntimeLeaseTests.cs | ||
| RetailWindowLayoutPersistenceTests.cs | ||
| RetailWindowManagerTests.cs | ||
| RetainedPanelControllerGroupTests.cs | ||
| RetainedUiInputBindingTests.cs | ||
| UiButtonStateMachineTests.cs | ||
| UiButtonTests.cs | ||
| UiClipRectTests.cs | ||
| UiCollapsibleFrameTests.cs | ||
| UiCompositeShutdownTests.cs | ||
| UiDatFontTests.cs | ||
| UiElementChildOrderTests.cs | ||
| UiFieldTests.cs | ||
| UiItemListGridTests.cs | ||
| UiItemListScrollTests.cs | ||
| UiItemListTests.cs | ||
| UiItemSlotTests.cs | ||
| UiLayoutPolicyTests.cs | ||
| UiMenuTests.cs | ||
| UiMeterTests.cs | ||
| UiMeterVerticalTests.cs | ||
| UiNineSlicePanelTests.cs | ||
| UiRadarTests.cs | ||
| UiRootInputTests.cs | ||
| UiScrollablePanelTests.cs | ||
| UiScrollableTests.cs | ||
| UiScrollbarTests.cs | ||
| UiTextDatFontTests.cs | ||
| UiTextTests.cs | ||