Insert link craches if at end of document

2 posts, 0 answers
  1. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 13 Jan 2012 Link to this post


    I have a RadRichTextBox connected to a RadRichTextBoxRibbonUI.

    If I open up a blank document, or an existing document and position the caret at the end of the document and then click on insert link.
    I add valid information and click OK in the dialog, I get a null reference exception:
    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.InsertHyperlink(HyperlinkInfo hyperlinkInfo, String hyperlinkText)
    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)

    But if I position the caret somewhere else, not at the end of the document it works fine.


  2. Iva Toteva
    Iva Toteva avatar
    1319 posts

    Posted 13 Jan 2012 Link to this post

    Hi Håkan,

    Both issues - with inserting/editing hyperlinks and inserting a symbol have been fixed in 2011 Q3 SP1 (2011.3.1220), which was released on December 20th 2011.
    Could you try using 2011 Q3 SP1? If you experience any issues, we would appreciate more details on the steps to reproduce the problem.

    Kind regards,
    Iva Toteva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top