AccessViolationException when setting character format in RichEditBox
See original GitHub issueHello, I’m not sure whether this is the right place to post this issue, but I’ve been having some problems (as well as many other users) with the RichEditBox
control since WinRT came out, and not those problems have persisted on UWP.
In my case, I’m getting a System.AccessViolationException
when setting the character format of a text range. Here’s a screen. There are two problems:
- An
AccessViolationException
is a low level exception that just can’t be caught with managed code, so I don’t think a control from the official framework like theRichEditBox
is ever supposed to throw one of these exceptions. - As you can see, the loop index here is 1103, and it changes every time, sometimes it works fine, sometimes it crashes at a different position, it just seems to happen at random.
I’ve also had other exceptions like that with the same RichEditBox
control, for example when setting some text with the SetText
method, and I’ve seen many other users complaining about similar issues in the past (see here and here).
The thing here is that it seems like the RichEditBox
control has had some bugs since the Windows Phone 8.1 days that nobody has ever fixed throughout all these years, and they are now present in Windows 10 as well.
Is there a workaround you can suggest for this specific crash I’m having? I don’t even understand why is it happening, I’m just setting the color of a selected range.
And also, could you let the team that works on this control that right now it’s not perfectly reliable and has a few issues? I hope this feedback might be useful to them! 😄
Thanks in advance for your help!
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top GitHub Comments
Thank you again for your help identifying and isolating this bug. We believe that we have fixed both this issue and the one mentioned here, as both stemmed from the same issue.
This fix should be coming your way in an upcoming Windows Insider build post-Fall Creators Update (build numbers higher than 17000+). Please reach out if you find that this issue still hits.
@Sergio0694
Hi Sergio,
Thank you for the crash dumps! I’m still unable to internally repro the bug. It may be that there are differences between my setup and yours. I was hoping you could tell me what language packs you have installed on the machine, as well as what your default language is.
Thank you again for raising the issue.