This is via the 2011.3.1116.1040 release.
We were attempting to update a record being displayed via the rich text box that has a hyperlink embedded in the text. We simply tried to update the hyperlink to the URL "https://@authorizeuserurl" and when we click OK we got the following exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Windows.Documents.Model.RadDocument.IsInRange(HierarchicalIndex inlineIndex, AnnotationRangeStart rangeStart)
at Telerik.Windows.Documents.Model.RadDocument.GetFieldStart(Inline inline)
at Telerik.Windows.Documents.Model.Inline.get_FieldStart()
at Telerik.Windows.Documents.Model.RadDocument.IsValidPosition(DocumentPosition p)
at Telerik.Windows.Documents.Model.RadDocument.EnsureValidPositionCallback(DocumentPosition p, Func`1 IsMoveForward)
at Telerik.Windows.Documents.DocumentPosition.ResumePositionValidation()
at Telerik.Windows.Documents.Model.RadDocument.ExecuteCommand(CommandBase command, DocumentCommandContext context)
at Telerik.Windows.Controls.RadRichTextBox.InsertHyperlink(HyperlinkInfo hyperlinkInfo, String hyperlinkText, StyleDefinition hyperlinkStyle)
at Telerik.Windows.Controls.RadRichTextBox.<ShowInsertHyperlinkDialog>b__24(String linkText, HyperlinkInfo linkInfo)
at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.RadInsertHyperlinkDialog.OnOkClicked()
at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.RadInsertHyperlinkDialog.buttonOK_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at Telerik.Windows.Controls.RadButton.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
When we click on cancel, this error:
System.InvalidOperationException: inline does not belong to this document.
at Telerik.Windows.Documents.Model.RadDocument.IsInAnnotationRange[TRangeStart](Inline inline, Predicate`1 filter, Boolean inclusive)
at Telerik.Windows.Documents.Commands.UndoableCommandBase.CanExecuteRespectingReadOnlyRanges(RadDocument document)
at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxCommandBase.UpdateCanExecute()
at Telerik.Windows.Documents.RichTextBoxCommands.ContextListeners.DocumentContextListener.ContextChangedEventHandler(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Telerik.Windows.Documents.DocumentPosition.OnPositionChanged()
at Telerik.Windows.Documents.DocumentPosition.MoveToPosition(DocumentPosition newPosition)
at Telerik.Windows.Controls.RadRichTextBox.<>c__DisplayClass28.<ShowInsertHyperlinkDialog>b__25()
at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.RadInsertHyperlinkDialog.RadWindow_Closed(Object sender, WindowClosedEventArgs e)
at Telerik.Windows.Controls.RadWindow.OnClosed(WindowClosedEventArgs args)
at Telerik.Windows.Controls.RadWindow.OnClosed()
at Telerik.Windows.Controls.WindowBase.TryClose(Boolean shouldCloseHost)
at Telerik.Windows.Controls.RichTextBoxUI.Dialogs.RadInsertHyperlinkDialog.buttonCancel_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at Telerik.Windows.Controls.RadButton.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Can you please help with an explaination as to why these exceptions may be occuring?
We used the RTB to add the text and add the link. The exception only occurs during an edit. The work around for the moment seems to be to remove the hyperlink and then readd.