Completed
Last Updated: 21 Mar 2022 08:38 by ADMIN
Release LIB 2020.2.831 (31/08/2020)
ADMIN
Tanya
Created on: 05 Jun 2018 11:56
Category: RichTextBox
Type: Bug Report
4
RichTextBox: NullReferenceException is thrown when undoing font size changes in a table containing a single cell
The parent of an already removed span cannot be found and a NullReferenceException is thrown while performing Undo. Also, multiple asserts are failing in Debug mode. The stack trace is:

UnhandledException: Object reference not set to an instance of an object.
UnhandledException:   at Telerik.Windows.Documents.Layout.LayoutElement.SetParent(LayoutElement newParent)
   at Telerik.Windows.Documents.Layout.LayoutBox.EnsureParent()
   at Telerik.Windows.Documents.Layout.LayoutBox.get_Parent()
   at Telerik.Windows.Documents.Layout.LayoutBox.get_ValidParent()
   at Telerik.Windows.Documents.WordPositionHandler.GetParentHandler()
   at Telerik.Windows.Documents.DocumentPosition.GetCurrentSectionBox()
   at Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.GetCurrentPage()
   at Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
3 comments
ADMIN
Ivan Ivanov
Posted on: 21 Mar 2022 08:38

Hi Joshua,

We received a report very similar to the one described by you. The client reports that the issue is still reproducible, despite the fix that we applied on the current item. In case the issue is not resolved for you, here is the new item: Crash in PasteOptionsPopup.

Regards,
Ivan Ivanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Martin
Posted on: 14 Apr 2020 07:16

Hi Joshua,

Thank you for the additional information provided. 

I included this scenario in our internal item.

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Joshua
Posted on: 13 Apr 2020 14:15

In my situation, this exception is unhandled and doesn't get thrown once but in a tight infinite loop until the window is closed. The call stack is also different.

System.NullReferenceException
Message: Object reference not set to an instance of an object.
Call Stack:
    at Telerik.Windows.Documents.Layout.LayoutElement.SetParent(LayoutElement newParent)
    at Telerik.Windows.Documents.Layout.LayoutBox.EnsureParent()
    at Telerik.Windows.Documents.Layout.LayoutBox.get_Parent()
    at Telerik.Windows.Documents.Layout.FormattingSymbolLayoutBox.get_IsEndOfCell()
    at Telerik.Windows.Documents.Layout.FormattingSymbolLayoutBox.GetFormattingSymbolVisual()
    at Telerik.Windows.Documents.SpanBoxPositionHandler.get_Location()
    at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.GetViewPointFromDocumentPosition(DocumentPosition position)
    at Telerik.Windows.Controls.RichTextBoxUI.PasteOptionsPopup.CalculateLocation()
    at Telerik.Windows.Controls.RichTextBoxUI.PasteOptionsPopup.OnOwnerLayoutUpdated(Object sender, EventArgs e)
    at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
    at System.Windows.ContextLayoutManager.UpdateLayout()
    at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
    at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
    at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
    at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)