-
-
Notifications
You must be signed in to change notification settings - Fork 15
LT-22388: Fix NullReferenceException in UnitOfWorkService.SaveOnIdle #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a NullReferenceException that occurs when the UnitOfWorkService's SaveOnIdle timer callback accesses the UI state (LastActivityTime) after the service has been disposed. The fix adds an early IsDisposed check after acquiring the lock but before accessing m_ui, preventing the exception from occurring.
Changes:
- Added IsDisposed check in SaveOnIdle method to prevent accessing m_ui.LastActivityTime when disposed
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jtmaxwell3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtmaxwell3 made 1 comment.
Reviewable status: 0 of 1 files reviewed, all discussions resolved.
|
Stabilize UnitOfWorkService autosave tests |
Add an early IsDisposed check to prevent accessing UI state (LastActivityTime) when the service has been disposed but the timer event still fires.
Cover IsDisposed and null UI paths in SaveOnIdle Filter ICU DLL paths for deterministic CustomIcuFallbackTests Add AGENTS onboarding notes and update workspace settings
jasonleenaylor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes and tests are all good, I'm not a huge fan of the Agents.md file, I think we can do better with not much effort. I'm going to approve and then I'll work on a replacement for a future PR.
@jasonleenaylor reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @johnml1135).
Add an early IsDisposed check to prevent accessing UI state (LastActivityTime) when the service has been disposed but the timer event still fires.
This change is