Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Text] Fix infinite loop hang on selection of bidi text #16306

Merged

Conversation

Mikolaytis
Copy link
Contributor

What does the pull request do?

Fixed infinite loop hand when selecting specific bidi text with different text style parameters. Found by our QA.

What is the current behavior?

Infinite loop hang. I've added unit test - comment my 3-line fix and run it. it will run forever

What is the updated/expected behavior with this PR?

this case is handled

@Mikolaytis
Copy link
Contributor Author

Hi @Gillibald, check this out!

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented Jul 13, 2024

  • All contributors have signed the CLA.

@Mikolaytis
Copy link
Contributor Author

@cla-avalonia agree

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050095-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added bug area-textprocessing backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch labels Jul 13, 2024
@Gillibald
Copy link
Contributor

What was happening here { GlyphRun.InkBounds.Width: < 0.1f }
Why are you using InkBounds?

Will have a detailed look shortly

@Gillibald
Copy link
Contributor

I think the general issue that needs to be fixes is that the coveredLength is zero

@Mikolaytis
Copy link
Contributor Author

Mikolaytis commented Jul 14, 2024

Just thrown first random fix I've found. Please use my unit test and provide your own well-thought fix. Thanks!

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050107-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050109-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050437-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@Gillibald Gillibald enabled auto-merge July 25, 2024 12:55
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050442-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@Gillibald Gillibald added this pull request to the merge queue Jul 25, 2024
Merged via the queue into AvaloniaUI:master with commit 20b5c2b Jul 25, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-textprocessing backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants