Skip to content

Fix collection modified during enumeration in package update checks - #49

Merged
emosaru merged 1 commit into
avaloniafrom
claude/hungry-jones
Apr 13, 2026
Merged

Fix collection modified during enumeration in package update checks#49
emosaru merged 1 commit into
avaloniafrom
claude/hungry-jones

Conversation

@emosaru

@emosaru emosaru commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Iterate .ToList() snapshots of Repositories and Packages collections in UpdatesAvailable and CurrentPackageHasUpdateAvailable to avoid InvalidOperationException when collections are modified concurrently
  • Add null checks on entries for safety

Based on codemann8's fix (codemann8/EmoTracker@617da7a).

Fixes #14

Test plan

  • Let EmoTracker run for 30+ minutes with package repositories configured
  • Verify no crash from "Collection was modified; enumeration operation may not execute"

🤖 Generated with Claude Code

Iterate temporary .ToList() snapshots of Repositories and Packages
collections in UpdatesAvailable and CurrentPackageHasUpdateAvailable
to avoid InvalidOperationException when collections are modified
concurrently. Add null checks on entries for safety.

Based on codemann8's fix (codemann8/EmoTracker@617da7a).

Fixes #14

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@emosaru
emosaru requested a review from a team April 13, 2026 18:57
@emosaru
emosaru merged commit 7af0029 into avalonia Apr 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant