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
The issue should be addressed in the latest hotfix (available back in August). You can get the download by going to My Infragistics => Keys and Downloads.
I have tried installing the WPF 2250 Service Release but error still persists
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.
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
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.
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?
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.
OK, settings at the solution level overridden confguration settings at project level. I'm doing the whole recompilation with solution level release settings. will update you for any issues after that.thanks
Andrew, I debugged the code and verified that these assert statements are poping up now and then.
for example Debug.Assert(adjustedScrollPosOfTargetRecord >= 0); is rasing while editing the records. I indeed built the binaries in release mode but the binaries are not dropping at bin/Release instead they always drop in bin/Debug mode. I'm not sure if some other settings are overriding. Can you help us to build the binaries in release mode and if I'm missing something?
Thanks.
I have never seen that assert being raised so I cannot say what is happening. If you want us to look into that you would need to supply a sample that reproduces the issue. Basically the only assert in that routine is veritying that we have exited edit mode (or more accurately that we don't still have a CVP for a cell in edit mode which would/should have been cleared when the cell exited edit mode unless there was a problem there or unless someone tried to force the cell back into edit mode likely on another cell). That may well have been happening in your real application without you knowing since you would only see the assert if you were using a debug build - which you weren't with the release version.