Hello! Team,
We have a WPF window in which we're using multiple RichTextBoxes (RTB). We encountered an object reference error while editing text in one of the rtb. Stack trace log attached.
Date Time : 2/27/2018 2:22:12 PM ,
User Name : XXXXXXXX,
NameSpace : Telerik.Windows.Documents.UI ,
Class Name : Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter ,
Method Name : UpdateCaretStyle ,
Exception Message : Object reference not set to an instance of an object. ,
Error Trace : at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateCaretStyle()
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateCaretSize()
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.DoOnCaretLocationChanged()
at Telerik.Windows.Documents.Utils.SuspendChangingAndChangedActionCounter.InvokeChangedActionInternal()
at Telerik.Windows.Documents.Utils.SuspendChangingAndChangedActionCounter.InvokeChanged()
at Telerik.Windows.Documents.DocumentPosition.OnLocationChanged(Boolean changesCursorInitialLocation)
at Telerik.Windows.Documents.DocumentPosition.CallOnPositionChanged(Boolean changesCursorInitialLocation)
at Telerik.Windows.Documents.Selection.MouseSelectionHandler.SetDocumentPosition(DocumentPosition documentPosition, Point position, Boolean moveToNextIfOutOfBox)
at Telerik.Windows.Documents.Selection.MouseSelectionHandler.RegisterDocumentMouseDown(Boolean ctrlPressed, Boolean shiftPressed, Point position, UIElement originalSource, SourceType source)
at Telerik.Windows.Documents.UI.DocumentPresenterBase.HandleMouseLeftButtonDownOnPosition(Point position, UIElement originalSource, SourceType source)
at Telerik.Windows.Documents.UI.DocumentPresenterBase.Owner_MouseLeftButtonDown(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) Inner Exception:
SourceFilePath: c:\Builds\13\AppPath\App.xaml.cs
RTB configuration:
<
telerik:RadRichTextBox
x:Name
=
"txtContent"
IsFocusable
=
"True"
PreviewKeyDown
=
"txtContent_PreviewKeyDown"
AutomationProperties.AutomationId
=
"{Binding TagValue,StringFormat=Comment_{0},RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
BorderThickness
=
"0"
BorderBrush
=
"White"
IsSpellCheckingEnabled
=
"True"
DocumentInheritsDefaultStyleSettings
=
"True"
GotFocus
=
"txtContent_GotFocus"
LostFocus
=
"txtContent_LostFocus"
DocumentContentChanged
=
"txtContent_DocumentContentChanged"
HorizontalContentAlignment
=
"Left"
IsContextMenuEnabled
=
"True"
MouseLeave
=
"txtContent_MouseLeave"
PreviewMouseRightButtonDown
=
"txtContent_PreviewMouseRightButtonDown"
KeyDown
=
"txtContent_KeyDown"
Background
=
"Transparent"
FontFamily
=
"Georgia (Body)"
IsSelectionMiniToolBarEnabled
=
"False"
AcceptsReturn
=
"True"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
Tag
=
"{Binding TagValue}"
MouseMove
=
"txtContent_MouseMove"
>
</
telerik:RadRichTextBox
>
Another issue with this exception is that we're not able to isolate exact steps to reproduce the issue.
As is seen in the logs the exception is not coming from any of our custom methods, its coming from some inbuild dll method of telerik. So, please suggest what could be causing this issue.
Regards
Tushar