sfRichTextBoxAdv unhandled exception

Hello

I tried to get create an incident for this but it's unable to process my request.

Just loaded the new 18.4.0.30 WPF dlls and an unhandled exception is being thrown by sfRichTextBoxAdv when closing the window.

"Object reference not set to an instance of an object."

"   at Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.IsChildFocused(Boolean isCalledFromTextBox)
   at Syncfusion.Windows.Controls.RichTextBoxAdv.SfRichTextBoxAdv.OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
   at System.Windows.UIElement.OnLostKeyboardFocusThunk(Object sender, KeyboardFocusChangedEventArgs e)
   at System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   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.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
   at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
   at System.Windows.Input.KeyboardDevice.CheckForDisconnectedFocus()
   at System.Windows.Input.KeyboardDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.PossiblyDeactivate(IntPtr hwndFocus)
   at System.Windows.Interop.HwndKeyboardInputProvider.FilterMessage(IntPtr hwnd, WindowMessage message, 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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)"

Regards
Allan

4 Replies 1 reply marked as answer

KG Kalaivannan Ganesan Syncfusion Team January 15, 2021 08:54 AM UTC

Hi Allan,

Thanks for contacting Syncfusion support.

We have tried to reproduce the reported issue with below replication procedure,

1. Created WPF application with SfRichTextBoxAdv control with version 18.4.0.30, with or without loading the document and closed the window,
but we don’t face any exceptions.

please refer the below attached sample, from where we try to reproduce the reported issue. Which can be downloaded from the following location.

https://www.syncfusion.com/downloads/support/forum/161548/ze/RTE_Exception-228332159

If your replication procedure is different, please share your replication steps with necessary information with sample to reproduce the reported issue from our side. It will help us to provide you the appropriate solution at the earliest.


Please let us know if you have any questions.

Regards,
Kalaivannan.
 
 



AL Allan January 15, 2021 09:15 AM UTC

Hello

Thanks for the prompt reply. I've extended your example to include enough code to cause the crash on exit.

I'm using a cancellation token and asynchronous loading as well.

Regards
Allan



Attachment: RTE_Exception_2d93d583.zip


KG Kalaivannan Ganesan Syncfusion Team January 15, 2021 11:03 AM UTC

Hi Allan,

Thanks for the Update.

We can reproduce the reported issue “
Exception thrown while closing the window by keeping search option panel opened“ and suspect this to be a defect . We will update you with further details on 19th January 2021.

Please let us know if you have any other questions.

Regards,
Kalaivannan 
 
 



KG Kalaivannan Ganesan Syncfusion Team January 19, 2021 10:01 AM UTC

Hi Allan,

Thanks for your patience,

The reason for issue “null reference thrown while closing the window when search pane is opened” is calling the dispose method of SfRichTextBoxAdv control in window’s OnClosing event in sample. Now we have handled the same SfRichTextBoxAdv dispose code in window’s OnClosed event, and it is working fine.

Also, we have modified the sample to demonstrate the same. Which can be downloaded from the following link.

https://www.syncfusion.com/downloads/support/forum/161548/ze/RTE_Exception_Solution530651765

Please let us know if you have any other questions.

Regards,
Kalaivannan
 
 


Marked as answer
Loader.
Up arrow icon