Simple Word Document Crashes WPF RadRichTextBox

0 Answers 21 Views
RichTextBox
Reilly
Top achievements
Rank 1
Veteran
Reilly asked on 09 Jul 2025, 08:28 PM | edited on 16 Jul 2025, 08:33 PM

I am using Telerik UI for WPF 2024 Q4\Binaries.NoXaml\WPF80\Telerik.Windows.Documents.Flow.FormatProviders.Doc.dll (version 2024.4.1106.60) on Windows 11 Pro (24H2). The program is developed using VS 2022.

It simply tries to load and display the attached DOCX file and the component crashes during layout with a null reference exception.

         using var instream = File.OpenRead(path);

         var openXmlRadDocProvider =
            new Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider();

         var raddoc = openXmlRadDocProvider.Import(instream);
         RadRtb.Document = raddoc;

Word displays this perfectly. Trying to determine if this is a Telerik bug or a "me" problem.

Stenly replied and said he was unable to reproduce using 2025.2.707. I am able to reproduce the crash with that version. I have attached my project in case I'm doing something wrong in code.

Thanks.

-John Reilly.

Reilly
Top achievements
Rank 1
Veteran
commented on 14 Jul 2025, 11:45 AM

It appears that the figure anchoring in this document crashes RadRichTextBox. If I change it from text wrapping "square" to text wrapping "in line with text", the content is rendered.

I don't think that the component should exception regardless of whether will render the document.

 

Stenly
Telerik team
commented on 14 Jul 2025, 03:29 PM

Hello Reilly,

I tested this with the 2024.4.1111 version, and I was able to observe the mentioned exception. I also tested the document with the latest version of our assemblies, which is 2025.2.707, and I was not able to reproduce it.

With this in mind, may I ask if it would be possible to update to it and see if the exception is still reproducible?

Reilly
Top achievements
Rank 1
Veteran
commented on 15 Jul 2025, 04:05 PM

Thanks, Stenly. I will update ASAP and update this post. I appreciate the response.

-Reilly

Reilly
Top achievements
Rank 1
Veteran
commented on 16 Jul 2025, 08:34 PM

Hi Stenly. Not sure how this system works.

I updated my question to include my results. I am able to reproduce using 2025.2.707 so I attached my code.

I bought a seat so I'll probably reproduce this in my account.

Thanks for looking.

Stenly
Telerik team
commented on 29 Jul 2025, 01:27 PM

Hello Reilly,

I tested the provided document and the sample project with the 2025.2.707 version of our assemblies, however, I am unable to reproduce the reported exception. Is there a possibility of showcasing this via a video, as well as showcasing the assemblies' version that is used while testing it?

Reilly
Top achievements
Rank 1
Veteran
commented on 01 Aug 2025, 12:25 PM

Hi Stenly,

I apologize for not updating this thread. It turns out that 2025.2.707 does work. The null ref exception gets thrown but the Telerik component catches and handles it. I had my environment set to break on exception and never pressed continue; I just assumed it still was unhandled.

Everything is great. Thanks for your help.

-reilly.

 

Stenly
Telerik team
commented on 01 Aug 2025, 12:41 PM

I am happy to hear that you managed to locate the cause on your end and that you took the time to share it with us.

No answers yet. Maybe you can help?

Tags
RichTextBox
Asked by
Reilly
Top achievements
Rank 1
Veteran
Share this question
or