LT-22388: Fix NullReferenceException in UnitOfWorkService.SaveOnIdle#361
LT-22388: Fix NullReferenceException in UnitOfWorkService.SaveOnIdle#361johnml1135 wants to merge 2 commits intosillsdev:masterfrom
Conversation
There was a problem hiding this comment.
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.
@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
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