Chart.combine sometimes results in "Collection was modified; enumeration operation may not execute."
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 860
- Forks
- 99
- Avg merge
- 22m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack trace through DynamicObj.GetProperties, DynObj.combine, GenericChart.combineLayouts, and GenericChart.combine; the issue names no source files or tests. Reproduce the intermittent exception while combining charts, then verify that chart combination no longer raises the collection-modified error and add regression coverage where the existing tests for this path are located.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100