Skip to content
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

Cannot access a disposed object in LibraryUpdateTimerCallback and UserUpdateTimerCallback #84

Open
oddstr13 opened this issue May 14, 2024 · 2 comments
Labels
upstream This is an issue originating from upstream

Comments

@oddstr13
Copy link
Member

          Also getting this after upgrading 10.9.1, error in LibraryUpdateTimerCallback, maybe related ?

Running in docker on debian

[2024-05-14 09:53:56.946 +02:00] [ERR] [89] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification: An error has occurred in LibraryUpdateTimerCallback
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ReaderWriterLockSlim'.
   at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
   at LiteDB.Engine.LockService.EnterTransaction()
   at LiteDB.Engine.TransactionMonitor.GetTransaction(Boolean create, Boolean queryOnly, Boolean& isNew)
   at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan)
   at LiteDB.Engine.LiteEngine.Query(String collection, Query query)
   at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.WriteLibrarySync(IEnumerable`1 items, ItemStatus status)
   at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.UpdateLibrary(IReadOnlyCollection`1 items, ItemStatus status)
   at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.PushChangesToDb(IReadOnlyCollection`1 itemsAdded, IReadOnlyCollection`1 itemsUpdated, IReadOnlyCollection`1 itemsRemoved)
   at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.LibraryUpdateTimerCallback(Object state)

Also "UserUpdateTimerCallback"

[2024-05-14 09:53:31.905 +02:00] [INF] [98] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Started user data sync
[2024-05-14 09:53:32.060 +02:00] [ERR] [98] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: An error has occurred in UserUpdateTimerCallback
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ReaderWriterLockSlim'.
   at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
   at LiteDB.Engine.LockService.EnterTransaction()
   at LiteDB.Engine.TransactionMonitor.GetTransaction(Boolean create, Boolean queryOnly, Boolean& isNew)
   at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan)
   at LiteDB.Engine.LiteEngine.Query(String collection, Query query)
   at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.<>c__DisplayClass10_0.<SetUserInfoSync>b__0(UserItemDataDto dto)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.SetUserInfoSync(List`1 dtos, List`1 itemRefs, String userId)
   at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification.SaveUserChanges(List`1 dtos, List`1 itemRefs, String userName, String userId)
   at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification.SendNotifications(IEnumerable`1 changes, List`1 itemRefs, CancellationToken cancellationToken)
   at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification.UpdateTimerCallback(Object state)

Originally posted by @abbekeff in #83 (comment)

@oddstr13
Copy link
Member Author

Reported by multiple people in issue #83 and the forum https://forum.jellyfin.org/t-error-in-kodiqueueplugin-after-update-to-10-9-1

@oddstr13
Copy link
Member Author

          Same thing here since the last 2 Jellyfin server updates:
[15:37:01] [ERR] [15] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification: An error has occurred in LibraryUpdateTimerCallback
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ReaderWriterLockSlim'.
   at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
   at LiteDB.Engine.LockService.EnterTransaction()
   at LiteDB.Engine.TransactionMonitor.GetTransaction(Boolean create, Boolean queryOnly, Boolean& isNew)
   at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan)
   at LiteDB.Engine.LiteEngine.Query(String collection, Query query)
   at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.WriteLibrarySync(IEnumerable`1 items, ItemStatus status)
   at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.UpdateLibrary(IReadOnlyCollection`1 items, ItemStatus status)
   at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.PushChangesToDb(IReadOnlyCollection`1 itemsAdded, IReadOnlyCollection`1 itemsUpdated, IReadOnlyCollection`1 itemsRemoved)
   at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.LibraryUpdateTimerCallback(Object state)

Originally posted by @axionman in #83 (comment)

oddstr13 added a commit that referenced this issue May 14, 2024
Hopefully works around #83 and #84
@oddstr13 oddstr13 added the upstream This is an issue originating from upstream label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream This is an issue originating from upstream
Projects
None yet
Development

No branches or pull requests

1 participant