Skip to content

Fix LT-22295: Crash when switching to Texts and Words#739

Merged
jtmaxwell3 merged 2 commits intomainfrom
LT-22295
Mar 17, 2026
Merged

Fix LT-22295: Crash when switching to Texts and Words#739
jtmaxwell3 merged 2 commits intomainfrom
LT-22295

Conversation

@jtmaxwell3
Copy link
Copy Markdown
Collaborator

@jtmaxwell3 jtmaxwell3 commented Mar 5, 2026

This fixes https://jira.sil.org/browse/LT-22295. Calling FocusBox.SelectOccurrence caused the FocusBox to be disposed when VwDrawRootBufferedClass.Create was called in SimpleRootSite.MakeRoot because the RTL property of the selected word was different from the default RTL property. Suppressing this change temporarily avoids the crash. I believe that the change will happen when the window is refreshed.


This change is Reviewable

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2026

NUnit Tests

    1 files      1 suites   5m 45s ⏱️
4 058 tests 3 987 ✅ 71 💤 0 ❌
4 067 runs  3 996 ✅ 71 💤 0 ❌

Results for commit 677cb7a.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

@papeh papeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall.

SetFocusBoxSizeForVc();
try
{
// Don't let the FocusBox be disposed in VwDrawRootBufferedClass.Create()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording in your commit comment is clearer than this comment. This comment could begin, "Suppress changes to prevent FocusBox from being disposed...." or similar

get { return false; }
}

public bool SuppressChanges = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private?

Copy link
Copy Markdown
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't come up with a better answer in sort order, so :LGETM:

@jasonleenaylor reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on jtmaxwell3).

@jtmaxwell3 jtmaxwell3 merged commit 2947f58 into main Mar 17, 2026
6 of 7 checks passed
@jtmaxwell3 jtmaxwell3 deleted the LT-22295 branch March 17, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants