Completed
Last Updated: 19 Mar 2021 12:37 by ADMIN
Release LIB 2021.1.322 (22/03/2021)
Martin Ivanov
Created on: 04 Mar 2021 10:46
Category: DataFilter
Type: Bug Report
1
DataFilter: NullReferenceException as a binding error occurs when a filter descriptor is removed

When you remove a filter descriptor via the X button in the UI a NullReferenceException is printed in the Visual Studio Output pane as a data binding error.

System.Windows.Data Error: 17 : Cannot get 'LogicalOperator' value (type 'FilterCompositionLogicalOperator') from 'CompositeFilter' (type 'CompositeFilterViewModel'). BindingExpression:Path=CompositeFilter.LogicalOperator; DataItem='FilterViewModel' (HashCode=15035499); target element is 'RadToggleButton' (Name='PART_CompositeFilterLogicalOperatorToggleButton'); target property is 'IsChecked' (type 'Nullable`1') TargetInvocationException:'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.Data.DataFilter.CompositeFilterViewModel.get_LogicalOperator()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at MS.Internal.Data.PropertyPathWorker.GetValue(Object item, Int32 level)
   at MS.Internal.Data.PropertyPathWorker.RawValue(Int32 k)'

You can safely ignore the error because it doesn't break the control or the application. In a single case it seemed that this error was causing also an AccessViolationException.

0 comments