You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using RichEditTextDocument.LoadFromStream(TextSetOptions, IRandomAccessStream) or RichEditTextDocument.SetText(TextSetOptions, String) throws exception when I attempt to load a RTF file/text which contains a RTL bulleted list and a numbered list.
Exception:
System.AccessViolationException
HResult=0x80004003
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
When using RichEditTextDocument.LoadFromStream(TextSetOptions, IRandomAccessStream): at Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(WinRT.IObjectReference _obj, Windows.Foundation.Size availableSize)
When using RichEditTextDocument.SetText(TextSetOptions, String): at Microsoft.WinUI.dll!ABI.Microsoft.UI.Text.ITextDocumentMethods.SetText(WinRT.IObjectReference _obj, Microsoft.UI.Text.TextSetOptions options, string value)
This is a sample RTF block that reproduce the issue:
Describe the bug
Using
RichEditTextDocument.LoadFromStream(TextSetOptions, IRandomAccessStream)
orRichEditTextDocument.SetText(TextSetOptions, String)
throws exception when I attempt to load a RTF file/text which contains a RTL bulleted list and a numbered list.Exception:
RichEditTextDocument.LoadFromStream(TextSetOptions, IRandomAccessStream)
:at Microsoft.WinUI.dll!ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(WinRT.IObjectReference _obj, Windows.Foundation.Size availableSize)
RichEditTextDocument.SetText(TextSetOptions, String)
:at Microsoft.WinUI.dll!ABI.Microsoft.UI.Text.ITextDocumentMethods.SetText(WinRT.IObjectReference _obj, Microsoft.UI.Text.TextSetOptions options, string value)
This is a sample RTF block that reproduce the issue:
The
\rtlpar
control word is what makes the app crash since removing it, or even replacing it with\ltrpar
control word, doesn't cause crash.Steps to reproduce the bug
RichEditBox
element..rtf
file that contains RTL listtest.rtf
file has the following content (in Arabic):Expected behavior
I expect
RichEditTextDocument
to be able to load any valid RTF file/text including those containing RTL lists.Screenshots
That's what I see when open the sample
.rtf
file using WordPad:NuGet package version
WinUI 3 - Windows App SDK 1.6.2: 1.6.241106002
Windows version
Windows 10 (21H2): Build 19044
Additional context
Loading the same file works fine in a WPF app!
The text was updated successfully, but these errors were encountered: