Frontmatter
| id | 8798 |
| title | Fix race condition in MagicMoveText.measureChars |
| state | Closed |
| labels | bugai |
| assignees | tobiu |
| createdAt | Jan 19, 2026, 9:31 AM |
| updatedAt | Jan 19, 2026, 9:35 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8798 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 19, 2026, 9:35 AM |
Fix race condition in MagicMoveText.measureChars
tobiu assigned to @tobiu on Jan 19, 2026, 9:31 AM

tobiu
Jan 19, 2026, 9:34 AM
Input from Gemini 3 Pro:
✦ Fixed race condition where
measureCharscould iterate over mismatching array lengths ifonResizetriggered concurrently withafterSetText. Added guard checks.
tobiu closed this issue on Jan 19, 2026, 9:35 AM
If
onResizetriggersmeasureChars, andafterSetTextupdatesme.charswhilegetDomRectis pending, a mismatch between the returnedrects(from old state) andme.chars(new state) causes a crash. Fix: Add a length check inmeasureCharsto ensurerectsmatchesme.charsbefore iterating.