plotly / plotly/Plotly.NET

Chart.combine sometimes results in "Collection was modified; enumeration operation may not execute."

未关闭
#357 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Status: Needs Repro
主要语言
F#
星标
860
派生
99
平均合并
22 分钟
30 天内合并 PR
1

描述

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext()
   at <StartupCode$DynamicObj-FSC472>.$DynamicObj.GetProperties@81.GenerateNext(IEnumerable`1& next)
   at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl()
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at DynamicObj.DynamicObj.GetProperties(Boolean includeInstanceProperties)
   at DynamicObj.DynObj.combine(DynamicObj first, DynamicObj second)
   at DynamicObj.DynObj.combine(DynamicObj first, DynamicObj second)
   at DynamicObj.DynObj.combine(DynamicObj first, DynamicObj second)
   at Plotly.NET.GenericChart.combineLayouts@243(Layout first, Layout second)
   at Plotly.NET.GenericChart.combine@309.Invoke(GenericChart acc, GenericChart elem)

The sequences of data I'm feeding it are from immutable lists; so I don't think it's a problem with the way I'm calling Plotly.NET.

I can try again (with the same data) and usually it is successful. Seems to be a sporadic issue. Very odd.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从经过 DynamicObj.GetProperties、DynObj.combine、GenericChart.combineLayouts 和 GenericChart.combine 的堆栈跟踪开始;该 issue 未指出源文件或测试。重现组合图表时偶发的异常,然后验证图表组合不再引发 collection-modified 错误,并在现有该路径测试所在的位置添加回归覆盖。

由索引模型根据 Issue 内容生成。

评估

技术栈
fsharp
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。