In Infragistics WPF4, version 20.1.20201.26, we are getting the following unhandled exception:
Outter Exception: "Exception thrown by the destination of a call." at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Delegate.DynamicInvokeImpl(Object[] args) 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)
Inner Exception: "Reference to an object not set to an object instance." at Infragistics.Windows.DataPresenter.ExpandableFieldRecord.ChildDataTrackingInfo.Initialize(DataPresenterBase dp, Boolean bypassAddNewCheck) at Infragistics.Windows.DataPresenter.ExpandableFieldRecord.VerifyChildRecordManager(Boolean alwaysCreateIfEnumerable) at Infragistics.Windows.DataPresenter.ExpandableFieldRecord.GetChildRcdCollection(Boolean alwaysCreateifEnumerable) at Infragistics.Windows.DataPresenter.ExpandableFieldRecord.get_ChildRecordsIfNeeded() at Infragistics.Windows.DataPresenter.Record.get_ViewableChildRecordsIfNeeded() at Infragistics.Windows.DataPresenter.Record.get_HasVisibleChildren() at Infragistics.Windows.DataPresenter.ExpandableFieldRecord.get_HasVisibleChildren() at Infragistics.Windows.DataPresenter.ExpandableFieldRecord.CheckHasChildData() at Infragistics.Windows.DataPresenter.ExpandableFieldRecord.OnDataChanged() at Infragistics.Windows.DataPresenter.DataRecord.RefreshCellValueHelper(Field field, Object cellValue) at Infragistics.Windows.DataPresenter.DataRecord.RefreshCellValue(Field field, Boolean raiseInitializeRecord, Boolean isRecordPresenterDeactivated) at Infragistics.Windows.DataPresenter.RecordManager.ProcessChangeNotification(Object sender, Object eventArgs) at Infragistics.Windows.DataPresenter.RecordManager.ProcessQueuedChangeNotifications(Boolean calledFromDelayedChange) at Infragistics.Windows.DataPresenter.RecordManager.OnDelayedChange()
Any ideas on how to correct this?
Thanks
Dan
Thank you
Hello Daniel,
I have investigated your issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of [273344]. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I have created a private support case with an ID of CAS-214142-Z8Z6F2 for you and I will continue assisting you via this support case. In order to view it on our web site please follow these steps:
1) Log in with your account on our web site - https://ko.infragistics.com
2) From the Support/Account menu item select View Account Info. This will lead you to My Keys & Downloads page - www.infragistics.com/.../keys-and-downloads
3) From the menu on the left side of the page select Support Activity - www.infragistics.com/.../support-activity
There you will find a list with all the active cases.
Please let me know if you have any additional questions regarding this matter inside the support case.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Regards, Ivan Kitanov
Ivan, any thoughts on this?
Ivan
I obtained a copy of your code and added tracing to it. I then deployed it in the field where the problem was encountered. It is in your ChildDataTrackingInfo’s Initialize method. The line “create = _underlyingData.GetEnumerator().MoveNext();” assumes GetEnumerator will always return a valid enumerator. In this particular case, the _underlyingData has been disposed, and the collection is no longer valid. The call stack shows that this logic is being hit as from the RecordManager OnDelayedChange. Normally one would expect an IEnumerable’s GetEnumerator to return a non-null value. However, the comment associated with the OnDelayChange method says “Added support for handling change notifications on another thread”. This, along with the call stack originating in the Dispatcher, shows that more than one thread is interacting with the underlying data. The lack of a null check along with the absence of a try/catch ultimately takes down our entire application with an unhandled exception.
Hello Dan,
I’m afraid that without a sample that can reproduce the issue as well as some steps to reproduce it will be hard to point out what the exact issue is and how to find a solution for it.
Additionally, since it occurs in one of your customer’s environments, we would need some more information, for example some of their environment’s specifications and also since you mentioned threading it may seem to occur randomly, but in fact threading exceptions could appear more on a certain PC than on another PC.
Looking forward to hearing from you.