Null Reference Exception thrown when typing opening parenthesis of object method

Hello,

The EditControl (19.2460.0.48) is causing a null object reference exception when I type the opening parenthesis of an object method. For example, 

var x = Convert.ToString(

the moment I type '(' the unhandled exception is thrown. Any opening parenthesis associated with any object method causes the exception. 

Setting 'EnableIntellisense' to true or false does not resolve the issue. 

  <syncfusion:EditControl x:Name="CodeEditControl"

                                    Text="{Binding Code, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"

                                    Height="500"

                                    Background="LightGray"

                                    DocumentLanguage="CSharp"

                                    DocumentSource="" ShowLineNumber="True"

                                    IntellisenseMode="Auto" EnableIntellisense="{Binding IntellisenseEnabled}"

                                    AssemblyReferences="{Binding AssemblyReferences}"

                                    EnableOutlining="True" FontSize="12" Margin="10"/>

Below is the StackTrace. 

at Syncfusion.Windows.Edit.ProceduralLanguageBase.GetContextPromptInfo(EditIntellisenseArgs scope)

   at Syncfusion.Windows.Edit.EditControl.OnTextInput(TextCompositionEventArgs e)

   at System.Windows.UIElement.OnTextInputThunk(Object sender, TextCompositionEventArgs e)

   at System.Windows.Input.TextCompositionEventArgs.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.TextCompositionManager.UnsafeCompleteComposition(TextComposition composition)

   at System.Windows.Input.TextCompositionManager.PostProcessInput(Object sender, ProcessInputEventArgs e)

   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)

   at System.Windows.Input.InputManager.ProcessStagingArea()

   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

   at System.Windows.Input.TextCompositionManager.UnsafeStartComposition(TextComposition composition)

   at System.Windows.Input.TextCompositionManager.PostProcessInput(Object sender, ProcessInputEventArgs e)

   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)

   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.ProcessTextInputAction(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)

   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 System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)

   at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)

   at System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled)

   at System.Windows.Interop.ThreadMessageEventHandler.Invoke(MSG& msg, Boolean& handled)

   at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)

   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

   at System.Windows.Window.ShowHelper(Object booleanBox)

   at System.Windows.Window.Show()

   at System.Windows.Window.ShowDialog()


Any assistance would be appreciated. 

Thanks,

Ken




2 Replies 1 reply marked as answer

KC Kenneth Carey July 29, 2021 12:14 AM UTC

Update: 

Removing  Text property binding to the ViewModel resolves the issue!





Marked as answer

VR Vijayalakshmi Roopkumar Syncfusion Team July 29, 2021 11:59 AM UTC

Hi Kenneth 
 
Thank you for contacting Syncfusion Support. 
 
We have checked the reported case "NRE exception occurred on bounding the text property" with EditControl, but we are unable to reproduce it on trying to type open parenthesis in EditControl. Please find the video, sample from following location 
 
 
 
Could you check the same and confirm us whether our understanding on the reported problem is correct. If not, kindly modify our sample to issue reproducible, so that we can check and proceed on it further. 
 
Please let us know if you need any other concerns. 
 
Regards, 
Vijayalakshmi VR 


Loader.
Up arrow icon