Hi,
I use the control SfRichtextboxAdv to load documents from a stream. This works mostly perfect but after loading a few (often the third document) the control throws the following error:
Source: "Syncfusion.SfRichTextBoxAdv.WPF"
Message: "Object reference not set to an instance of an object."
Stacktrace:
" at Syncfusion.Windows.Controls.RichTextBoxAdv.PageLayoutViewer.AddVisiblePage(PageAdv page, Double x, Double y, Boolean addAsInitial)"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.PageLayoutViewer.UpdatePageToViewer(PageAdv page, Boolean updateViewerSize)"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.LayoutViewer.RemovePage(PageAdv page)"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.PageAdv.Dispose()"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.BodyWidget.Dispose()"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.ParagraphWidget.Dispose()"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.BodyWidget.Dispose()"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.SectionAdv.Dispose()"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.DocumentAdv.Dispose()"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.OnDocumentChanged(DependencyPropertyChangedEventArgs e)"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.OnDocumentChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)"
" at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)"
" at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)"
" at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)"
" at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)"
" at System.Windows.DependencyObject.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata)"
" at System.Windows.DependencyObject.ClearValue(DependencyProperty dp)"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.DocumentAdv.Dispose()"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.InitDocumentLoad()"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.LoadInternal(Stream documentStream, FormatType formatType)"
" at Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.Load(Stream stream, FormatType formatType)"
The control itself is embedded into an windows forms project using elementhost. Version of the control is 17.4460.0.39
Any idea what is causing this crash? Is it a bug or do I miss something? First time loading the doucment seems to work always but after the second or third time the chances are high to hit this issue.
Thanks!