You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QfcFormController.Cleanup() tears down state the undo consumer is still using, without first stopping that consumer. QuickFiler/Controllers/QfcFormController.SetupDisposal.cs:216-220 disposes _undoQueue and nulls _globals and _groups while never cancelling or awaiting _undoConsumerTask. A consumer iteration still in flight can therefore observe a disposed queue or a null global, producing an ObjectDisposedException or a NullReferenceException on a background task during teardown.
Environment
OS/version:
Python version:
Command/flags used:
Data source or fixture:
Steps to Reproduce
Start the undo consumer so _undoConsumerTask is running and blocked on a take.
Invoke Cleanup() while that iteration is in flight.
Observe the consumer touching _undoQueue, _globals or _groups after QuickFiler/Controllers/QfcFormController.SetupDisposal.cs:216-220 has disposed or nulled them.
Expected Behavior
Cleanup cancels the consumer, awaits _undoConsumerTask to a terminal state, and only then disposes the queue and releases _globals and _groups.
Actual Behavior
Cleanup disposes and nulls first and never awaits the task, so teardown races the consumer.
Logs / Screenshots
Attached minimal logs or screenshot
Snippet:
Impact / Severity
Medium
Race confined to teardown, but it can surface as an unobserved background task exception.
The promotion tool maps only a subset of the potential-entry headings into the issue body; ## Suspected Cause / Notes and ## Proposed Fix / Validation Ideas were dropped. Restoring them here so the provenance and the remediation ideas are not lost.
Suspected Cause / Notes
Discovered during issue #446 (docs/features/active/quickfiler-bug-family-446), which fixed the consumer loop's own termination and its finally reset but did not change Cleanup(). QuickFiler/Controllers/QfcFormController.SetupDisposal.cs was outside #446's owned file set.
Proposed Fix / Validation Ideas
Cancel the consumer's token, then await _undoConsumerTask (with a bounded timeout) before disposing _undoQueue
Unit coverage driving Cleanup() against an in-flight consumer, asserting no exception escapes and the task reaches a terminal state
Confirm Cleanup() remains safe when the consumer was never started
Superseded by consolidated issue #731, which tracks this finding along with 4 related ones sharing the same blast radius (QuickFiler controller lifecycle/disposal). See #731 for detail.
Activity
drmoisan commentedon Aug 26, 2026
The promotion tool maps only a subset of the potential-entry headings into the issue body;
## Suspected Cause / Notesand## Proposed Fix / Validation Ideaswere dropped. Restoring them here so the provenance and the remediation ideas are not lost.Suspected Cause / Notes
Discovered during issue #446 (
docs/features/active/quickfiler-bug-family-446), which fixed the consumer loop's own termination and itsfinallyreset but did not changeCleanup().QuickFiler/Controllers/QfcFormController.SetupDisposal.cswas outside #446's owned file set.Proposed Fix / Validation Ideas
_undoConsumerTask(with a bounded timeout) before disposing_undoQueuedrmoisan commentedon Sep 2, 2026
Superseded by consolidated issue #731, which tracks this finding along with 4 related ones sharing the same blast radius (QuickFiler controller lifecycle/disposal). See #731 for detail.
docs(potential): record promoted records for 3 blast-radius-consolida…