LayoutAreaHost disposal registry mutated while DisposeExistingAreas enumerates it, failing an Overview re-render
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with src/MeshWeaver.Layout/Composition/LayoutAreaHost.cs, especially DisposeExistingAreas, RenderArea, and the disposal registry's RegisterForDisposal and teardown call sites; then review ContainerControl.cs and PR #5952, #5946, and issue #606 for lifecycle context. Trace whether disposal callbacks or concurrent renders mutate the registry during enumeration. Done means identifying the mutation path and adding a regression test that reproduces the failure.
Written by the indexing model from the issue text.
Description
Observed
A render of the Overview layout area on the memex-cloud namespace failed with System.InvalidOperationException: Collection was modified; enumeration operation may not execute. thrown from List<T>.ForEach inside MeshWeaver.Layout.Composition.LayoutAreaHost.DisposeExistingAreas(EntityStore store, RenderingContext context) (src/MeshWeaver.Layout/Composition/LayoutAreaHost.cs:1664). Per the stack, this happened during LayoutAreaHost.RenderArea(RenderingContext, IObservable<UiControl?>, EntityStore) (LayoutAreaHost.cs:1959), reached through ContainerControl<T>.WithView/Render aggregation (ContainerControl.cs:199, :356) and a second RenderArea overload (LayoutAreaHost.cs:922). DisposeExistingAreas runs on a re-render, when previously rendered areas are torn down before the new pass — so the host's disposal registry was mutated while DisposeExistingAreas was enumerating it.
Where and when
One occurrence, ever, on one pod (memex-portal-deployment-684b7f8bbb-v6dg5), at a single instant (2026-10-18T20:26:48Z). A single burst, not a steady rate; no correlation with a roll or restart was read. Timing context worth knowing: the default node page (Overview/Data/Edit) was rebuilt by PR Systemorph/MeshWeaver#5952 ("the default node page is a template", merged 2026-10-02; pod rolls replace activations). That PR moved this area's node-content mirror from a per-render ReplaceDisposable under a synthetic key to NodePageProjections.MirrorContent, registered via host.RegisterForDisposal(context.Area, subscription) in the control's buildup — i.e. keys under the area name that DisposeExistingAreas/DisposeChildAreas reap by prefix. The pre-#5952 code carried an explicit warning that RegisterForDisposal re-registration per render was the #606 accumulation bug, and that teardown only removes keys starting with the area name.
Impact
One failed render of one hub's Overview area — the default node page for that viewer at that instant. Judged from the numbers (1 occurrence, 1 pod), this is not an outage; it is a defect signal on a primary rendering path. Whether the client recovered on a subsequent render is not established.
Not established
- The cause. Nothing on the incident says which code mutated the list during the
ForEach. - Whether the failing hub was serving the post-#5952 page shape (the pod's build/image date against the 2026-10-02 merge and its roll was not read).
- Which node/viewer triggered the render — the fingerprinted sample masks the node path and the line is truncated before it.
- Whether it still occurs, or whether other areas show the same failure.
Candidate causes and the reading that separates them
- Reentrant mutation from a dispose callback. A disposable registered under an area key, disposed inside
DisposeExistingAreas'ForEach, synchronously triggers work that registers or removes an entry on the same list (e.g. a mirror/Bindsubscription's teardown or a final emission causing a nested render or data update on the same host). Predicts: failure only during re-renders that tear down an already-rendered area; reproducible by racing a node edit with a re-render of theOverviewarea. Discriminating reading: instrument or review the register/remove call sites for the disposal registry inside dispose paths — does any callback reached fromForEachre-enterRegisterForDisposalor area teardown on the same host? - Concurrent render mutating the registry. A second render pass (e.g. a nested embedded area, or a delivery on another scheduler) adds/removes entries while
DisposeExistingAreasenumerates on the first thread. Predicts: recurrence spread across pods under load, and two interleaved render logs around the same instant. Discriminating reading: thread ids and surrounding render/teardown log lines for the same hub at the same timestamp; whether nested-area renders run concurrently on oneLayoutAreaHost. - Interaction with the #5952 registration model.
MirrorContent/TemplateBindregister in the control buildup; if a buildup can run per emission rather than once per rendered area, a registration can land while a disposal pass is enumerating — the shape the pre-#5952ReplaceDisposableguard (issue #606) was written against. Predicts: only on builds rolled after 2026-10-02, only on node-hub pages with bound content (Overview/Data/Edit/NodeContentForm). Discriminating reading: the pod's build/image timestamp, and whether the failing hub's page used the bound templates (a node hub with a configured content type on the current build).
Where to look
src/MeshWeaver.Layout/Composition/LayoutAreaHost.cs — DisposeExistingAreas (line 1664 per the stack) and the RenderArea overloads (lines 922, 1959); src/MeshWeaver.Layout/ContainerControl.cs lines 199 and 356; the area-keyed disposal registry (RegisterForDisposal and the key-prefix teardown it feeds). For the changed lifecycle around it: PR Systemorph/MeshWeaver#5952 (Hosting/Triage/pull-request/systemorph-meshweaver-5952 in this mesh), its part 1 #5946, and issue #606; area model documented at Doc/GUI/LayoutAreas.
Not a duplicate: no existing incident or issue carries this fingerprint; the other LayoutAreaHost "Rendering failed" incidents in Admin/_LogIncident are distinct shapes (ObjectDisposedException, TaskCanceledException, ArgumentException, TypeLoadException).
Evidence
| Fingerprint | b06b203fb4bf76c6 |
| Category | MeshWeaver.Layout.Composition.LayoutAreaHost |
| Severity | Error |
| Exception | System.InvalidOperationException |
| Top frame | MeshWeaver.Layout.Composition.LayoutAreaHost.DisposeExistingAreas(EntityStore store, RenderingContext context) |
| Namespace | memex-cloud |
| Pods | memex-portal-deployment-684b7f8bbb-v6dg5 |
| Occurrences | 1 |
| First seen | 2026-10-18 20:26:48Z |
| Last seen | 2026-10-18 20:26:48Z |
| Routing | not determined — no configured route matches the category MeshWeaver.Layout.Composition.LayoutAreaHost. This repository is the configured fallback, not a finding about who owns the fault; the category names the LOGGER, which may not be the subject. |
Recent log lines
2026-10-18 20:26:48Z memex-portal-deployment-684b7f8bbb-v6dg5 fail: MeshWeaver.Layout.Composition.LayoutAreaHost[0]
Rendering failed for area Overview
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at MeshWeaver.Layout.Composition.LayoutAreaHost.DisposeExistingAreas(EntityStore store, RenderingContext context) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Layout/Composition/LayoutAreaHost.cs:line 1664
at MeshWeaver.Layout.Composition.LayoutAreaHost.RenderArea(RenderingContext context, IObservable`1 generator, EntityStore store) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Layout/Composition/LayoutAreaHost.cs:line 1959
at MeshWeaver.Layout.ContainerControl`1.<>c__DisplayClass33_0.<WithView>b__0(LayoutAreaHost host, RenderingContext context, EntityStore store) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Layout/ContainerControl.cs:line 199
at MeshWeaver.Layout.ContainerControl`1.<>c__DisplayClass51_0.<Render>b__0(EntityStoreAndUpdates acc, Renderer r) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Layout/ContainerControl.cs:line 356
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at MeshWeaver.Layout.Composition.LayoutAreaHost.RenderArea(RenderingContext context, Object view, EntityStore store) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Layout/Composition/LayoutAreaHost.cs:line 922
at MeshWeaver.Layout.ContainerControl`1.<>c__DisplayClass51_0.<Render>b__0(EntityStoreAndUpdates acc, Renderer r) in /home/runner/work/MeshWeaver/MeshWeaver/src/MeshWeaver.Layout/ContainerControl.cs:line 356
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at MeshWeaver.Layout.Composition.LayoutAreaHost.RenderArea(RenderingContext context, Object view, Enti…[truncated]
Opened automatically from Admin/_LogIncident/b06b203fb4bf76c6. Recurrences are folded into this issue rather than opening new ones.
It also stands for the whole log site 96bbc97baba7b520: other fingerprints of this site fold in here as comments rather than opening tickets of their own.
- Dominant language
- C#
- Stars
- 12
- Forks
- 5
- Avg merge
- 5h 55m
- Merged PRs (30d)
- 968
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
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.
More from Systemorph/MeshWeaver
-
bug sev:M
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Systemorph/MeshWeaver#6980 ·
Maintainers usually reply within 1 day
-
bug sev:M
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Systemorph/MeshWeaver#6977 · 2 comments ·
Maintainers usually reply within 1 day
-
Feedback hand-over cannot relocate re-typed legacy submissions: the Inbox move's copy leg refuses their legacy content $typePossibly taken @rbuergi claimed this today. Openbug sev:M
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Systemorph/MeshWeaver#6951 · 9 comments ·
Maintainers usually reply within 1 day
-
bug sev:L
Difficulty 4/5 3-5 days Newbie friendliness 28/100
Systemorph/MeshWeaver#6930 · 5 comments ·
Maintainers usually reply within 1 day
-
bug sev:M
Difficulty 4/5 3-5 days Newbie friendliness 12/100
Systemorph/MeshWeaver#6857 · 20 comments ·
Maintainers usually reply within 1 day
All issues in Systemorph/MeshWeaver
Similar issues
-
Backend enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
UI: money shows the minus sign next to the number, not before the currency (IL -3.0m, not -IL 3.0m)Openarea: sim area: unity enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eyalgolan/statecraft-israel#1107 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
dimitar-radenkov/Pointframe#271 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
qew21/Genshin-Subtitles#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
HoffmanEngineering/3d-print-log-api#274 ·
Maintainers usually reply within 1 day