When trying to import a document containing bookmark and BookmarkRangeEnd is after the last paragraph, a StackOverflowException is thrown in IntervalNode while trying to rebuild the document cache. (RadDocumentChildrenCache.RebuildTree()). The same could be observed if the bookmark end is last in the header/footer, between table cells in the RadDocument body, or when all paragraphs after the bookmark range end are hidden (with vanish property). Workaround: Detect the problematic annotations and remove them: foreach (var rangeStart in document.EnumerateChildrenOfType<AnnotationRangeStart>()) { if (rangeStart.End == null || rangeStart.End.Parent == null || rangeStart.End.Parent.Parent == null) { //MessageBox.Show("This indicates a problem."); rangeStart.Parent.Children.Remove(rangeStart); } } Note: Until 2017 R2 SP1 release StackOverflowException is thrown, after this release an ArgumentException should be thrown.
private
void
RadRichTextBox_CommandExecuting(
object
sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
{
if
(e.Command
is
PasteCommand &&
this
.radRichTextBox.Document.IsEmpty)
{
this
.radRichTextBox.Insert(
" "
);
}
}
To reproduce:
protected override void OnClosing(CancelEventArgs e)
Use the attached project to reproduce.
- Click the "Go To endPosition" button. The Caret remains on the same line.
StackOverflowException is sometimes thrown while a document containing annotations is updated in the main thread (e.g. by typing in it), and spell checking is enabled. The exception is thrown in a background thread, which call stack similar to this one: 2f89dfe8 00566287 Telerik.Windows.Documents.Cache.IntervalTree.IntervalNode`2[[System.__Canon, mscorlib],[Telerik.Windows.Documents.Cache.IntervalTree.HierarchicalIndexStruct, Telerik.Windows.Documents]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>) 2f89e084 00566287 Telerik.Windows.Documents.Cache.IntervalTree.IntervalNode`2[[System.__Canon, mscorlib], ... 2f89e4dc 00565cd8 Telerik.Windows.Documents.Cache.RadDocumentChildrenCache.RebuildTree() 2f89e52c 005658c1 Telerik.Windows.Documents.Cache.RadDocumentChildrenCache.Rebuild() 2f89e538 1413b704 Telerik.Windows.Documents.Cache.RadChildrenCacheBase`1[[System.__Canon, mscorlib]].EnsureValid() 2f89e568 00568c72 Telerik.Windows.Documents.Cache.RadDocumentChildrenCache.ContainsAnnotationMarkersOfType[[System.__Canon, mscorlib]]() 2f89e5c0 00568b29 Telerik.Windows.Documents.Cache.RadDocumentChildrenCache.GetContainingAnnotationRanges[[System.__Canon, mscorlib]](Telerik.Windows.Documents.Model.Inline, Boolean) 2f89e618 0056896f Telerik.Windows.Documents.Model.RadDocument.GetContainingAnnotationRanges[[System.__Canon, mscorlib]](Telerik.Windows.Documents.Model.Inline, System.Predicate`1<System.__Canon>, Boolean) 2f89e654 1b6b76d3 Telerik.Windows.Documents.Proofing.DocumentProofingManager.IsPositionInIgnoredRange(Telerik.Windows.Documents.DocumentPosition) 2f89e664 1b6b72e7 Telerik.Windows.Documents.Proofing.DocumentProofingManager+<SplitRangeToUpdate>d__2.MoveNext() 2f89e690 1b6b7019 Telerik.Windows.Documents.Proofing.DocumentProofingManager.UpdateIncorrectWordsList(Telerik.Windows.Documents.DocumentPosition, Telerik.Windows.Documents.DocumentPosition) 2f89e6c0 1b6b6ef2 Telerik.Windows.Documents.UI.Layers.TextDecorationLayers.ProofingErrorsDecorationUILayer+<>c__DisplayClass9.<MarkBoxesWithSpellingErrorsAsynch>b__5() 2f89e6d0 1b612094 Telerik.Windows.Documents.Utils.DelayedExecution.ExecuteAction(Boolean) 2f89e6e4 1b6b6e34 Telerik.Windows.Documents.Utils.DelayedExecution.OnThreadingTimer(System.Object) 2f89e704 65fa5b38 System.Threading.TimerQueueTimer.CallCallbackInContext(System.Object) 2f89e708 65fc4157 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 2f89e774 65fc4096 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 2f89e788 65fa5a81 System.Threading.TimerQueueTimer.CallCallback() 2f89e7bc 65fa593c System.Threading.TimerQueueTimer.Fire() 2f89e7fc 65fa5861 System.Threading.TimerQueue.FireNextTimers() 2f89e83c 65fa5724 System.Threading.TimerQueue.AppDomainTimerCallback() 2f89ea68 66d73de2 [DebuggerU2MCatchHandlerFrame: 2f89ea68] Note: Until 2017 R2 SP1 release StackOverflowException is thrown, after this release an ArgumentException should be thrown.
Declined: Not reproducible anymore.
Quickly adding/removing of tab stop from the document's ruler crashes the application.
HtmlFormatProvider cannot import a document that contains an image with invalid URI format. An UriFormatException is thrown and the whole import fails. Similar errors should be handled and the document should be imported.
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:(no path); DataItem=null; target element is 'SolidColorBrush' (HashCode=63604780); target property is 'Color' (type 'Color')
When an application is built with .net version 4.7, the paragraph dialog is clipped in the bottom.
Hi support,
We have a problem when we copy a text from MS word to RitchTextBox.
If the text copied uses an style that the namecontains tilde, then style name on the ritchtextbox is broken with strange characters.
All works well with this strange characters, but if you export to html and then import to ritchtextbox, the style is lost ...
This is a big problem because in spanish, many styles have tildes. When our user copy content from word they have problem with html format export / import.
I Attach a MS Word docx with a style with tildes:
Steps to reproduce it:
1- Open MS Word attached.
2- Copy the content.
3- Open a ritchTextBox Editor
4- Paste the content.
5- Export to html
6- Import the html.
You can see now, that the style are lost, and the name of the style contains strange characters.
Similar issue its happen when open a Word Docx with styles with tildes from ritchTextBox, not include strange characters but the style is lost.
Thanks for you support,