Reading from this dictionary in CalendarView.body prior to the crash is legit (main thread)
But there can also be writes on background threads originating in MediaCalendar.fetchMovies
Solution: mark the dictionary as @MainActor, mark any method that uses it (e.g. maybeInsertMovie) as @MainActor. Consider marking all view models as @MainActor by default, use nonisolated as an exception where needed.
https://ruddarr.sentry.io/issues/5856640924/?environment=appstore&project=4506759167803392&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&statsPeriod=14d&stream_index=2
MediaCalendar.fetchMovies
@MainActor
, mark any method that uses it (e.g.maybeInsertMovie
) as@MainActor
. Consider marking all view models as@MainActor
by default, usenonisolated
as an exception where needed.