Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi,

                                    I went through new errors on RichEditControl.

                                    In attachment you'll find a sample application that exposes two kind of errors: a GDI and an Out Of Memory error.

                                    Just two words on the operations' flow:

                                    - clicking the "GDI Error" Button, a Document is loaded into the editor, variables are calculated and substitutions made. Then, clicking "OK" on

                                    subsequent message box, the application tries to save the Document using the SaveDocument method by stream. Then the exception is raised.

                                    - clicking che "OOM Error", the Document is loaded and variables calculated. Clicking "OK" on the Message Box, the document is saved using the

                                    same method. When I try to reload the document I get the error. In my original project I need to reload the document after saving.

                                    Hoping it's clear enough.

                                    Thanks.

                                SampleApplicationRichEditControl_2Errors.zip
                                0

                                Hi,

                                The GDI+ error is caused by the fact that you are disposing of image and document streams when they are being loaded (note that they are loaded asynchronously). I have removed the "Using" statement from your code and that fixed the issue. As for the OutOfMemoryException, it is caused by the logo image insertion:

                                	
                                [VB.NET]
                                If LogoImg IsNot Nothing Then Dim rangePos = txtTesto.Document.FindAll("<@LogoCliente@>", API.Native.SearchOptions.None) If rangePos.Length > 0 Then Dim img = txtTesto.Document.InsertImage((rangePos(0).Start), LogoImg) img.ScaleX = 0.5 img.ScaleY = 0.5 End If End If txtTesto.Document.ReplaceAll("<@LogoCliente@>", "", API.Native.SearchOptions.None)

                                I will contact our developers regarding this issue and let you know once we have any results.

                                Thanks,
                                Alessandro.

                                Q281892Updated.zip
                                0

                                Hi,

                                as you sgggests, I got rid of all the "using" in my code, in order to avoid disposing objects still needed.

                                Now, with this change, I get only one type of error: the Out Of Memory one.

                                In attachment, I put the new code.

                                Hoping this could be solved soon.

                                Thanks.

                                SampleApplicationRichEditControl_without_using.zip
                                0

                                Hi,

                                Thank you for your feedback. We are working on your problem and unfortunately we need some time to analyze it. We will do it as soon as possible, and will let you know about our progress. Please accept our apologies for the delay.

                                Thanks,
                                Alessandro.

                                0

                                Hi,
                                may I have some information about why the procedure needs the stream to be left open?
                                Once I load an Image object and pass it to the insertimage procedure were is the link to the original memory stream used to create the Image?

                                thanks
                                Andrea

                                0

                                Hello Andrea,

                                It is related to the asynchronous nature of the document content loading. Since you are disposing of the image stream in your code immediately, there might be a situation when it is only partially loaded. This might result in a corrupted document.

                                Thanks,
                                Alessandro.

                                0

                                Hello Andrea,

                                I am glad to inform you that our developers have managed to fix this issue. The fix will be available with the next XtraRichEdit Suite update (v2011 vol 2.9). Your application will operate without an OutOfMemoryException with this update. You can request a public fix immediately (prior to the official release) if this is a matter of urgency for you. For more details about this service, please read Julian's blog at Getting your fix: the DevExpress way .

                                Thanks,
                                Alessandro.

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Your Privacy - Legal Statements

                                Copyright © 1998-2013 Developer Express Inc.
                                ALL RIGHTS RESERVED
                                All trademarks or registered trademarks
                                are property of their respective owners