Fix ObjectDisposedException crash in SetStatus (#105)#107
Merged
erikdarlingdata merged 1 commit intodevfrom Mar 18, 2026
Merged
Fix ObjectDisposedException crash in SetStatus (#105)#107erikdarlingdata merged 1 commit intodevfrom
erikdarlingdata merged 1 commit intodevfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRefactored the status auto-clear logic in QuerySessionControl to improve CancellationTokenSource management. The change disposes the previous token source upfront before initializing a new one for each 3-second delay cycle, and removes the nulling pattern after expiry. Includes a minor formatting adjustment. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
The CTS disposal added in #97 could race with the 3-second Task.Delay continuation. If SetStatus was called again after the old CTS was disposed but before the continuation ran, Cancel() on the disposed CTS threw ObjectDisposedException, crashing the app. Fix: null out the field before Cancel/Dispose so the next call never touches the disposed instance. Closes #105 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6ee4702 to
ebf281f
Compare
rferraton
pushed a commit
to rferraton/PerformanceStudio
that referenced
this pull request
Mar 18, 2026
…rikdarlingdata#107) The CTS disposal added in erikdarlingdata#97 could race with the 3-second Task.Delay continuation. If SetStatus was called again after the old CTS was disposed but before the continuation ran, Cancel() on the disposed CTS threw ObjectDisposedException, crashing the app. Fix: null out the field before Cancel/Dispose so the next call never touches the disposed instance. Closes erikdarlingdata#105 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
erikdarlingdata
added a commit
that referenced
this pull request
Mar 18, 2026
* add Descending First click behavior for the query-store grid sort * Add bar charts into the query store grid * Add barcharts to the query store grid. Theme is setup in a dedicated theme file * fix double using * Fix issue #105 * Fix ObjectDisposedException crash in SetStatus (#105) (#107) The CTS disposal added in #97 could race with the 3-second Task.Delay continuation. If SetStatus was called again after the old CTS was disposed but before the continuation ran, Cancel() on the disposed CTS threw ObjectDisposedException, crashing the app. Fix: null out the field before Cancel/Dispose so the next call never touches the disposed instance. Closes #105 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix app crash when loading Query Store plans or switching databases. The CTS disposal added in #97 raced with the 3-second
Task.Delaycontinuation — callingCancel()on an already-disposed CTS threwObjectDisposedException.Fix: null out the field before Cancel/Dispose so subsequent calls never touch the disposed instance.
Test plan
Closes #105
🤖 Generated with Claude Code
Summary by CodeRabbit