-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Typing fl
or fi
in a textbox crashes with Avalonia 11.0.10 on MacOS
#14939
Comments
The same crash also happens on Linux, just typing |
received similar report in irihitech/Semi.Avalonia#347 |
I have tested the issue and found that inputting 20240518-165642.383-0.mp4 |
Currently we handle hit testing via glyph clusters. So a delete action always removes the whole ligature. |
Can confirm on Avalonia 11.0.10 that typing fi in any TextBox causes a similar crash. Not seeing that deleting behavior however. So fixing the font to Courier stopped the crashing and did not cause that deleting behavior. |
We're experiencing the same crash typing We're using Inter font. |
I am experiencing the same |
Probably fixed by #15971. Can someone check? |
Can someone provide a sample that runs as is and reproduces the issue? I can't reproduce any crash |
@Gillibald I have no code in the project except a window defined like this - hopefully this lets you reproduce the crash on your end, too.
Typing
|
Okay thanks |
The provided sample reproduces the issue but only with Avalonia 11.0.X and not with the current master |
@Gillibald Please, check text from my PR #15971 |
It reproduces via some unit test in all Avalonia versions |
On Windows I get the same bug. In the code below buffer after calling "font.Shape" fills only with one glyph info.
For Example: ff (CodePoint=102) converts to single different glyph with CodePoint=299 Mb Related issue: harfbuzz/harfbuzz#3000 (comment) AvaloniaUI.ff.Glyph.Bug.mp4 |
We are deleting grapheme clusters instead of codepoints when we handle backspace |
Describe the bug
Apps built with Avalonia 11.0.10 and 11.1.0-beta1 packages crash repeatably on MacOS 14.4, when typing
fi
orfl
in a text box.To Reproduce
git clone https://github.com/Actipro/Avalonia-Controls.git cd Avalonia-Controls/Samples/SampleBrowser/SampleBrowser.Desktop dotnet run
Select Themes from the drop-down at the top-left corner, then type
fl
orfi
in a textbox (e.g. E-mail Address below):The text input is processed and shown as expected. Close the sample browser app.
Edit the file
Avalonia-Controls/Samples/SampleBrowser/References/Avalonia.References.props
and update:Run the application again, this time using Avalonia 11.0.10 packages:
cd Avalonia-Controls/Samples/SampleBrowser/SampleBrowser.Desktop dotnet run
Type
fl
orfi
in one of the text boxes. The application crashes, printing this stack trace:The same crash also reproduces with Avalonia
11.1.0-beta1
packages.Reverting
<AvaloniaVersion>
to 11.0.7, or 11.0.9, no longer reproes -- this appears to be a regression in 11.0.10 and later versions.Expected behavior
Entering text that may result in ligatures being displayed (e.g.
fi
orfl
) does not crash on MacOS.Avalonia version
11.0.10, 11.1.0-beta1
OS
macOS
Additional context
No response
The text was updated successfully, but these errors were encountered: