Bug Report T314096
Visible to All Users

NullReferenceException occurs on changing a document by using RichEditDocumentServer if the RichEditDocumentServer.LayoutCalculationMode property is set to Automatic

created 9 years ago (modified 9 years ago)

Hello,

I attached a small project to this issue to demonstrate the use of a converter I developed using your RichEditDocumentServer and illustrating the problem that I have. The converter (class RichTextToMetafileConverter) export a RichTextFormat document in Metafile. Prior to do the conversion, it calculate the size of the page based on RTF content using LayoutVisitor, so the exported image will be set to a 'best fit' dimension.

This code has been in production for a while and was working as expected with version prior to 15.1.4. We want to update to v 15.8 to be compatible with visual studio 2015, but we now encounter crash during the conversion. If a table is part of the RTF, the crash will occurs when setting the table indent (RtfToEmf.cs - line 61), otherwise the crash will occurs when exporting to image (RtfToEmf.cs - line 92).

To use the example, simply write text in the RichEditControl and press the "To EMF" button.

Can you confirm if this is an issue, or a walkaround to prevent the crash?

Thank you

Sylvain

Comments (2)
DevExpress Support Team 9 years ago

    Hello,
    I have managed to reproduce the aforementioned behavior. At the moment, I cannot provide you with any workaround.
    I passed this ticket to our developers for further research. Please bear with us.
    We will notify you as soon as we make any progress.

      Hello,
      You can mark this ticket public if you remove the project file.
      Thank you for your quick response and fixing the issue.

      Answers approved by DevExpress Support

      created 9 years ago (modified 9 years ago)

      We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

      Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.