i have just upgraded my computer to a Sony all in one PC and i have installed all the software i use,, but when it comes to running my application which uses infragistics controls via deployment and via Debugging environment the app crashes as soon as it has to load data into a XamDataGrid with the following error:
Argument Exception was unhandled
Item has already been added. Key in dictionary: 'Infragistics.Windows.Automation.Peers.DataPresenter.CellAutomationPeer' Key being added: 'Infragistics.Windows.Automation.Peers.DataPresenter.CellAutomationPeer'
I have tried tracking down the error but to no avail so any assistance will be greatly appreciated.
The Computer is running Windows 7 Professional 64bit and im using NetAdvantage WPF 2010.3
Andrew, our entire suite is compiled with the local fix and when application installed with the fix , I got this assertion failure message in one of our scenarios. I've not completed testing all possible scenarios.Could you verify the reason behind this message? Basically we have a grid component which has combo boxes in two columns added as xam editors. Items can be selected in each of these combo boxes and rows will be added dynamically once selection complete in any single row. While doing random selections, following assertion failure message popped up. This will be real concern for me to release the fix to QA.
Andrew, thanks for the explanation. This became a major issue for us right now as one of customer was not able to use application since July. The fix you suggested perfectly working but QA is not ready to signoff the fix till they get the impacted areas. The grid control is been used extensively in the suite and the QA has limited time to go over all the areas as our product release is just few days away.
I debugged the GetChildernCore() method and it appears this method is called when grid control is a child for another WPF control (grid is added as combo box item ).
I've not seen the method call in below scenarios
Grid initial loading, Item selection in the grid, sorting , field layout changes ,scrolling etc..Not sure if this analysis is correct.
We saw that the GetChildernCore method is getting called when grid was added as child element and when we grid is opened (for example Grid is added as combo box item and when combo box item is opened GetChildernCore is called repeatedly).
Also I found null object reference exception in DataPresenterBase OnSorted event in the grid while sorting however this is not causing any crash.
Could you please provide some insight on any of the areas that could have an impact like above?
Unfortunately I do not have a specific set of steps or scenario that will be the catalyst for the issue. Basically the issue is that the RecordAutomationPeer would get the list of child automation peers from the associated RecordPresenter's peer. It would then add in the CellAutomationPeers that represent the cells (since cells are virtualized). At some later point the GetChildrenCore of the RecordAutomationPeer was requested again at which point it did this process again. However since it had manipulated the list instance from the RecordPresenter, if the RecordPresenter returned that same List<AutomationPeer> instance then it would already have the CellAutomationPeers for the record and when the WPF framework was building a dictionary of the peers it blew up because it contained multiple instances of the same AutomationPeer.
Thank you, this issue is found in only certain C# projects. I'm not sure why the failure is seen in only few projects and not in all though all the projects has same references.
For example the reference path looks like this for all the projects.
<Reference Include="Infragistics3.Wpf.v9.1, Version=9.1.20091.1006, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\..\public\Infragistics\Infragistics3.Wpf.v9.1.dll</HintPath> </Reference>
Please let me know if you have any clue on this
I'm sorry but we do not provide the public/private key file that we use to sign our assemblies as that is used to uniquely identify the assemblies that we have tested and built. If you compile the source then you must update the projects to reference your versions of the assemblies and recompile them.