NullReferenceException when removing filters

17 posts, 0 answers
  1. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 23 Mar 2011 Link to this post

    Hello,

    Since the upgrade to Q1 2011, I'm getting an NullReferenceException when removing a filter from DataFilter control, It's critcal for me as I cannot upload a new version to my users, it's urgent. IntelliTrace shows the following call stack trace, hope it helps:

    > System.Windows.dll!System.Windows.CLRPropertyListener.Value.set(object value) + 0x23 bytes 
      System.Windows.dll!System.Windows.PropertyAccessPathStep.Value.set(object value) + 0x10 bytes 
      System.Windows.dll!System.Windows.Data.BindingExpression.UpdateValue() + 0x3b2 bytes 
      System.Windows.dll!System.Windows.Data.BindingExpression.UpdateValueIfNecessary() + 0x27 bytes 
      System.Windows.dll!System.Windows.Data.BindingExpression.TargetPropertyChanged(System.Windows.DependencyObject sender, System.Windows.DependencyProperty dp) + 0x2b bytes 
      System.Windows.dll!System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyProperty dp) + 0x17 bytes 
      System.Windows.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyProperty dp) + 0x51 bytes 
      System.Windows.dll!System.Windows.DependencyObject.RaisePropertyChangeNotifications(System.Windows.DependencyProperty dp, object oldValue, object newValue) + 0x5c bytes 
      System.Windows.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.DependencyProperty property, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry, System.Windows.DependencyObject.ValueOperation operation) + 0xf6 bytes 
      System.Windows.dll!System.Windows.DependencyObject.SetValueInternal(System.Windows.DependencyProperty dp, object value, bool allowReadOnlySet) + 0x1da bytes 
      System.Windows.dll!System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty dp, object value) + 0xb bytes 
      Telerik.Windows.Controls!Telerik.Windows.Controls.Selector.UpdatePublicSelectionProperties() + 0x19c bytes 
      Telerik.Windows.Controls!Telerik.Windows.Controls.Selector.SelectionChanger<object>.End() + 0x30 bytes 
      Telerik.Windows.Controls!Telerik.Windows.Controls.Selector.SelectionChanger<object>.ClearItems() + 0x47 bytes 
      mscorlib.dll!System.Collections.ObjectModel.Collection<object>.Clear() + 0x40 bytes 
      Telerik.Windows.Controls!Telerik.Windows.Controls.Selector.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + 0x509 bytes 
      Telerik.Windows.Controls.Input!Telerik.Windows.Controls.RadComboBox.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + 0x25 bytes 
      System.Windows.dll!System.Windows.Controls.ItemsControl.OnItemCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + 0x52 bytes 
      System.Windows.dll!System.Windows.Controls.ItemCollection.NotifyCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + 0x37 bytes 
      System.Windows.dll!System.Windows.Controls.ItemCollection.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + 0x20 bytes 
      System.Windows.dll!System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + 0x3d bytes 
      System.Windows.dll!System.Collections.ObjectModel.ObservableCollection<Telerik.Windows.Data.FilterOperator>.OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + 0x3a bytes 
      System.Windows.dll!System.Collections.ObjectModel.ObservableCollection<Telerik.Windows.Data.FilterOperator>.ClearItems() + 0x93 bytes 
      mscorlib.dll!System.Collections.ObjectModel.Collection<Telerik.Windows.Data.FilterOperator>.Clear() + 0x27 bytes 
      Telerik.Windows.Controls.Data!Telerik.Windows.Controls.Data.DataFilter.SimpleFilterViewModel.Dispose(bool disposing) + 0xaf bytes 
      Telerik.Windows.Controls!Telerik.Windows.Controls.ViewModelBase.Dispose() + 0x26 bytes 
      Telerik.Windows.Controls.Data!Telerik.Windows.Controls.Data.DataFilter.FilterViewModel.Dispose(bool disposing) + 0x5c bytes 
      Telerik.Windows.Controls!Telerik.Windows.Controls.ViewModelBase.Dispose() + 0x26 bytes 
      Telerik.Windows.Controls.Data!Telerik.Windows.Controls.Data.DataFilter.CompositeFilterViewModel.FilterViewModelCollection.Detach(Telerik.Windows.Controls.Data.DataFilter.FilterViewModel viewModel) + 0x7a bytes 
      Telerik.Windows.Controls.Data!Telerik.Windows.Controls.Data.DataFilter.CompositeFilterViewModel.FilterViewModelCollection.RemoveItem(int index) + 0x3b bytes 
      mscorlib.dll!System.Collections.ObjectModel.Collection<Telerik.Windows.Controls.Data.DataFilter.FilterViewModel>.Remove(Telerik.Windows.Controls.Data.DataFilter.FilterViewModel item) + 0x75 bytes 
      Telerik.Windows.Controls.Data!Telerik.Windows.Controls.Data.DataFilter.FilterViewModel.OnRemoveCommand() + 0xaa bytes 
      Telerik.Windows.Controls.Data!Telerik.Windows.Controls.Data.DataFilter.FilterViewModel.RemoveFilterCommand.Execute(object parameter) + 0x2a bytes 
      Telerik.Windows.Controls!Telerik.Windows.Controls.RadButton.ExecuteCommand() + 0x7c bytes 
      Telerik.Windows.Controls!Telerik.Windows.Controls.RadButton.OnClick() + 0x3f bytes 
      System.Windows.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e) + 0x8e bytes 
      System.Windows.dll!System.Windows.Controls.Control.OnMouseLeftButtonUp(System.Windows.Controls.Control ctrl, System.EventArgs e) + 0x31 bytes 
      System.Windows.dll!MS.Internal.JoltHelper.FireEvent(System.IntPtr unmanagedObj, System.IntPtr unmanagedObjArgs, int argsTypeIndex, int actualArgsTypeIndex, string eventName) + 0x234 bytes 
      [Appdomain Transition] 
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 23 Mar 2011 Link to this post

    Hello Daní,

    We have just fixed a bug that resembles your description very much. The fix will be available with the next Latest Internal Build.

    Meanwhile, what do we need to do to reproduce your exception? We want to test locally against the fixed binaries. Thanks in advance.

    Best wishes,
    Ross
    the Telerik team
  3. DevCraft banner
  4. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 23 Mar 2011 Link to this post

    Hello Ross,

    Reproducing the error is really easy, just adding a filter and then removing it causes the exception. I'm placing the RadDataFilter as the DropDownContent of a RadRibbonDropDownContent placed in a RadRibbonGroup. Don't doubt to contact me if you need more info a demo solution.
  5. Lee Weisenberger
    Lee Weisenberger avatar
    72 posts
    Member since:
    Nov 2009

    Posted 23 Mar 2011 Link to this post

    You can see the same, or similar, exception by looking at the Telerik Demos for the RadDataFilter.

    Using the DomainDataSource DataFilter example, add one or more filters, then try to clear all of the filters by clicking on the red 'X' next to the 'And' root.  This is throwing an exception even in the demo.
  6. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 24 Mar 2011 Link to this post

    Hi Lee Weisenberger,

    Could you please test this when the Latest Internal Build rolls out on Monday. Let me know if there are problems after you upgrade to it. Thanks.

    Greetings,
    Ross
    the Telerik team
  7. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 28 Mar 2011 Link to this post

    Hi Ross,

    It seems is not working yet, maybe you're not updated the demo yet. In addition at this bug, when the changing the filtering property, the FilterOperator often appears empty.
  8. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 28 Mar 2011 Link to this post

    Hi Daní,

    We have not released a Latest Internal Build yet.

    Don't look at the demo, since it will not be updated until the service pack.

    What you need to do is test with the Latest Internal Build once it is released later today.

    I hope this makes sense.

    All the best,
    Ross
    the Telerik team
  9. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 28 Mar 2011 Link to this post

    Hi Ross

    When do you plan release the service pack? I don't like using LIB versions, I have many problems with telerik's dll verisions and TFS when using LIB assemblies.
  10. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 28 Mar 2011 Link to this post

    Hi Daní,

    In mid-April.

    Kind regards,
    Ross
    the Telerik team
  11. Morten Vange
    Morten Vange avatar
    1 posts
    Member since:
    Sep 2009

    Posted 29 Mar 2011 Link to this post

    We have the same problem at finds the Datafilter in Q1 2011 not useful at all due to many bugs related to this topic. Please send service pack asap. Thanks beforehand
  12. David
    David avatar
    7 posts
    Member since:
    Oct 2010

    Posted 11 Apr 2011 Link to this post

    Hi, when do you expect the SP? I'm planning on using DataFilter in one of my projects but I can't until this issue is fixed. Thanks!
  13. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 12 Apr 2011 Link to this post

    Hi,

     The official Q1 2011 SP1 will be released before the end of this week. 

    Greetings,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 15 Apr 2011 Link to this post

    Hi,

    When SP1 will be available?
  15. Hristo
    Admin
    Hristo avatar
    408 posts

    Posted 15 Apr 2011 Link to this post

    Hello Daní,

    Q1 2011 SP1 will be shipped early next week.

    All the best,
    Hristo
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  16. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 20 Apr 2011 Link to this post

    Hello,

    Finally, Q1 SP1 is here. This issue is fixed and, till now, I haven't experienced any error removing filters. But, I think, still one fix is missing. Whenever users changes the property wich he wants filter by, the operator combo gets empty. 
  17. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 21 Apr 2011 Link to this post

    Hello,

    I found a workaround to, by the moment, solve the empty operator combobox issue when changing Member in a Filter Descriptor. First, you have to subscribe to RadDataFilter.FilterDescriptors.ItemChanged event. This evebt is raised each time a filter property (Member, Value or Operator) is modified. The event handler methods is as follows:
    private void FilterItemChanged(object sender, ItemChangedEventArgs<IFilterDescriptor> e)
            {
                if (e.PropertyName == "Member")
                {
                    Deployment.Current.Dispatcher.BeginInvoke(() =>
                    {
                        if ((e.Item as FilterDescriptor).Operator == FilterOperator.IsEqualTo)
                            (e.Item as FilterDescriptor).Operator = FilterOperator.IsNotEqualTo;
                        (e.Item as FilterDescriptor).Operator = FilterOperator.IsEqualTo;
                    }
                    );
                }
            }
  18. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 26 Apr 2011 Link to this post

    Hello Daní,

    Thanks for the workaround.

    We will investigate this weird behaviour. What I have noticed is that it only happens sometimes, which is very strange.

    Kind regards,
    Ross
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner