rappen / FetchXMLBuilder

FetchXML Builder for XrmToolBox and Microsoft Dynamics 365 / CRM
https://fetchxmlbuilder.com/
GNU General Public License v3.0
133 stars 55 forks source link

Result view crashes sometimes #983

Closed rappen closed 9 months ago

rappen commented 9 months ago

Probably when displaying results, and the columns are updated. Error is most likely in the https://github.com/rappen/Rappen.XTB.Helper

System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Rappen.XTB.Helpers.Controls.XRMDataGridView.GetCellsFromLayoutXML(String layoutxml)
   at Rappen.XTB.Helpers.Controls.XRMDataGridView.set_LayoutXML(String value)
   at Rappen.XTB.FetchXmlBuilder.DockControls.ResultGrid.SetLayoutToGrid()
   at Rappen.XTB.FetchXmlBuilder.Controls.attributeControl.SaveInternal(Boolean keyPress)
   at Rappen.XTB.FetchXmlBuilder.Controls.FetchXmlElementControlBase.Save(Boolean keyPress)
   at Rappen.XTB.XmlEditorUtils.ControlUtils.ComboBoxEventHandler.OnSelectedIndexChanged(Object sender, EventArgs e)