Current filter:
                                You should refresh the page.
                                  • We noticed a ArgumentException when converting rtf to plain text:

                                    System.Exception: Background thread exception ---> System.ArgumentException: An item with the same key has already been added.   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
                                       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
                                       at DevExpress.Office.UniqueItemsCache`1.AppendItem(T item)
                                       at DevExpress.Office.UniqueItemsCache`1.AddItemCore(T item)
                                       at DevExpress.XtraRichEdit.Model.TextRunBase.get_MergedCharacterFormattingCacheIndex()
                                       at DevExpress.XtraRichEdit.Model.TextRunBase.get_MergedCharacterFormatting()
                                       at DevExpress.XtraRichEdit.Model.VisibleTextFilterBase.IsRunVisibleCore(RunIndex runIndex)
                                       at DevExpress.XtraRichEdit.Model.VisibleTextFilter.IsRunVisibleCore(RunIndex runIndex)
                                       at DevExpress.XtraRichEdit.Model.VisibleTextFilter.IsRunVisible(RunIndex runIndex)
                                       at DevExpress.XtraRichEdit.Model.VisibleTextFilterBase.FindVisibleRunForward(RunIndex runIndex)
                                       at DevExpress.XtraRichEdit.Layout.Engine.ParagraphIteratorBase..ctor(Paragraph paragraph, PieceTable pieceTable, IVisibleTextFilter visibleTextFilter)
                                       at DevExpress.XtraRichEdit.Layout.Engine.BeginParagraphFormatting.EnsureParagraphBoxes()
                                       at DevExpress.XtraRichEdit.Layout.Engine.BeginParagraphFormatting.FormatParagraph()
                                       at DevExpress.XtraRichEdit.Layout.Engine.ParagraphFormatter.FormatParagraphCore()
                                       at DevExpress.XtraRichEdit.Layout.Engine.ParagraphFormatter.FormatParagraph()
                                       at DevExpress.XtraRichEdit.Layout.Engine.BackgroundFormatter.PerformPrimaryLayoutCore()
                                       at DevExpress.XtraRichEdit.Layout.Engine.BackgroundFormatter.HandleCommand(Int32 commandIndex)
                                       at DevExpress.XtraRichEdit.Layout.Engine.BackgroundFormatter.Worker(Object parameter)
                                       --- End of inner exception stack trace ---
                                       at DevExpress.XtraRichEdit.Layout.Engine.BackgroundFormatter.TryRethrowThreadException()
                                       at DevExpress.XtraRichEdit.Layout.Engine.BackgroundFormatter.SuspendWorkerThread()
                                       at DevExpress.XtraRichEdit.Layout.Engine.BackgroundFormatter.Dispose(Boolean disposing)
                                       at DevExpress.XtraRichEdit.Internal.InnerRichEditDocumentServer.DisposeBackgroundFormatter()
                                       at DevExpress.XtraRichEdit.Internal.InnerRichEditDocumentServer.Dispose(Boolean disposing)
                                       at DevExpress.XtraRichEdit.Internal.InternalRichEditDocumentServer.DisposeCore()
                                       at DevExpress.XtraRichEdit.Internal.InternalRichEditDocumentServer.Dispose(Boolean disposing)
                                       at DevExpress.XtraRichEdit.RichEditDocumentServer.Dispose(Boolean disposing)

                                Show all comments
                                • Ingvar (DevExpress Support) 09.09.2019

                                  Hi Jochen,

                                  I was not able to reproduce this behavior using the attached sample project. Would you please modify this project to demonstrate the issue? I will examine it and do my best to find an appropriate solution.

                                  I look forward to hearing from you.

                                • Jochen Möller 09.10.2019

                                  We use the following code to convert from rich text to plain text:

                                          public string ConvertRtfToPlain(string rtf)
                                              using (var server = CreateDocumentServer())
                                                  server.RtfText = rtf;
                                                  return server.Text;

                                          private IRichEditDocumentServer CreateDocumentServer()
                                              var server = new RichEditDocumentServer
                                                  LayoutCalculationMode = CalculationModeType.Automatic

                                              server.Options.Export.Rtf.ExportFinalParagraphMark = ExportFinalParagraphMark.Never;

                                              return server;

                                • Ingvar (DevExpress Support) 09.11.2019

                                  Hi Jochen,

                                  I still cannot reproduce this issue. Please modify the attached sample project to demonstrate this behavior. We will examine the issue and do our best to resolve it as soon as possible.

                                • Jochen Möller 09.16.2019

                                  Unfortunately i'm not able to reproduce that either... but were monitoring this issues on a regular basis at our customer production environments. Could this be a threading or concurrency related issue?

                                • Ingvar (DevExpress Support) 09.16.2019

                                  Hi Jochen,

                                  According to your original call stack, you are trying to obtain plain text after RichEditDocumentServer has been disposed of. So, this issue may be related to multi-threading, but I cannot say for sure without being able to reproduce this behavior on my side.

                                • Jochen Möller 09.17.2019

                                  Fortunately i was able to reproduce the issue by running multiple conversion in parallel.
                                  Please try the bug sample application enclosed. 

                                • Ingvar (DevExpress Support) 09.17.2019

                                  Hi Jochen,

                                  I see the issue. I am forwarding this ticket to our developers for further processing. You will receive an automatic message once we have any results.

                                • Ingvar (DevExpress Support) 09.18.2019

                                  Hi Jochen,

                                  A small follow-up. As a workaround, you can remove the following code string to use the manual LayoutCalculationMode:

                                  LayoutCalculationMode = CalculationModeType.Automatic
                                • Jochen Möller 09.18.2019
                                • Jochen Möller 10.18.2019

                                  We appreciate the release of service release version 19.1.7, but unfortunately we're not able to update because:

                                  The feed ' [[]']([]') lists package 'DevExpress.Document.Processor.19.1.7' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again.

                                • Ingvar (DevExpress Support) 10.18.2019

                                  Hi Jochen,

                                  I have just tested this package, and it is installed properly. Would you please try to install it once again? In addition, try installing it to a new project and let me know how it goes.

                                1 Solution

                                Creation Date Importance Sort by