This is a migrated thread and some comments may be shown as answers.

Very odd exception upon row insert (WPF_Scrum etc)

4 Answers 142 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James Stewart
Top achievements
Rank 1
James Stewart asked on 23 Mar 2010, 03:16 AM

I am binding a grid to a collection within an object and now get the following stack trace immediately I press Insert or click the 'click to add new row' area of the grid. I am using V 2010.1. Before I start debugging in earnest, please let me know what you think of this trace, which includes a reference to "c:\Builds\WPF_Scrum\..." which is odd, there being no such folder on my PC.
The application uses NHibernate and of course I would not expect you to advise on its behaviour. But, any pointers would be gratefully received!

James.
[stack trace start]
System.NotImplementedException was unhandled by user code
  Message="This is a DynamicProxy2 error: the interceptor attempted to 'Proceed' for a method without a target,
for example, an interface method or an abstract method"
  Source="DynamicProxyGenAssembly2"
  StackTrace:
       at IncidentParameterProxyfd420842db7242d3b17261419bc48c98.Invocationadd_PropertyChanged_1.InvokeMethodOnTarget()
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at Castle.Core.Interceptor.StandardInterceptor.Intercept(IInvocation invocation)
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at IncidentParameterProxyfd420842db7242d3b17261419bc48c98.add_PropertyChanged(PropertyChangedEventHandler value)
       at System.ComponentModel.PropertyChangedEventManager.StartListening(Object source)
       at System.ComponentModel.PropertyChangedEventManager.PrivateAddListener(INotifyPropertyChanged source, IWeakEventListener listener, String propertyName)
       at System.ComponentModel.PropertyChangedEventManager.AddListener(INotifyPropertyChanged source, IWeakEventListener listener, String propertyName)
       at MS.Internal.Data.PropertyPathWorker.ReplaceItem(Int32 k, Object newO, Object parent)
       at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
       at MS.Internal.Data.PropertyPathWorker.AttachToRootItem(Object rootItem)
       at MS.Internal.Data.ClrBindingWorker.AttachDataItem()
       at System.Windows.Data.BindingExpression.Activate(Object item)
       at System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
       at System.Windows.Data.BindingExpression.AttachOverride(DependencyObject target, DependencyProperty dp)
       at System.Windows.Data.BindingExpressionBase.Attach(DependencyObject target, DependencyProperty dp)
       at System.Windows.Data.BindingExpressionBase.OnAttach(DependencyObject d, DependencyProperty dp)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.Data.BindingOperations.SetBinding(DependencyObject target, DependencyProperty dp, BindingBase binding)
       at Telerik.Windows.Controls.GridViewBoundColumnBase.SetBindingIfNeeded(DependencyObject target, DependencyProperty property) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 230
       at Telerik.Windows.Controls.GridView.GridViewCell.UpdateValue() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1044
       at Telerik.Windows.Controls.GridView.GridViewCell.OnColumnChanged(GridViewColumn oldColumn, GridViewColumn newColumn) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1035
       at Telerik.Windows.Controls.GridView.GridViewCellBase.set_Column(GridViewColumn value) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCellBase.cs:line 236
       at Telerik.Windows.Controls.GridView.DataCellsPresenter.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\DataCellsPresenter.cs:line 258
       at System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 866
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.InsertNewContainer(Int32 childIndex, UIElement container) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 785
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 768
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateChild(IItemContainerGenerator generator, Size constraint, GridViewColumn column, Int32& childIndex, Size& childSize) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 680
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateChildren(IItemContainerGenerator generator, Int32 startIndex, Int32 endIndex, Size constraint) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 720
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateAndMeasureChildrenForRealizedColumns(Size constraint) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 209
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 86
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
       at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
  InnerException: 
[stack trace end]

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 23 Mar 2010, 11:58 AM
Hello,

Most probably you have our PDB files in your application.

Sincerely yours,
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.
0
James Stewart
Top achievements
Rank 1
answered on 23 Mar 2010, 04:08 PM
I am trying to eliminate possible causes of this error and have seen another post which is not entirely different and which exposed a bug in the Telerik code. In further debugging, will your PDB files help or hinder debugging, and does the stack trace suggest to you whether the bug is in Telerik code or my code?

jas
0
Vlad
Telerik team
answered on 23 Mar 2010, 04:31 PM
Hello jas,

Indeed our PDF files can help you to get the exception stack trace - in this case the exception is thrown after execution of Castle.DynamicProxy.AbstractInvocation.Proceed() method.

All the best,
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.
0
Jason
Top achievements
Rank 1
answered on 07 Jul 2011, 03:45 PM
Just to close this topic.  I had a similar issue.  It was solved by implementing the AddingNewDataItem event and setting the NewObject property of the event arguments to a new object of the type of the collection to which the object is being added.

Looks something like this.

private void GridView_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
{
  e.NewObject = new ObjectOfTheTypeYouWantToAdd();
}
Tags
GridView
Asked by
James Stewart
Top achievements
Rank 1
Answers by
Vlad
Telerik team
James Stewart
Top achievements
Rank 1
Jason
Top achievements
Rank 1
Share this question
or