jellyfin / jellyfin-plugin-playbackreporting

Playback Statistics Plugin for Jellyfin
https://jellyfin.org
GNU General Public License v3.0
70 stars 24 forks source link

System.ArgumentOutOfRangeException: Index was out of range #77

Open Natrinicle opened 1 year ago

Natrinicle commented 1 year ago

Started getting the following errors every 10 seconds or so in the log output. Running Jellyfin in a Docker container with Nvidia HW Acceleration and have a couple of DLNA media centers on the network which might be related given the last traceback line?

[16:44:55] [ERR] Error reporting progress
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint.SessionManager_PlaybackProgress(Object sender, PlaybackProgressEventArgs e)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at Emby.Dlna.PlayTo.PlayToController.OnDevicePlaybackProgress(Object sender, PlaybackProgressEventArgs e)
capJavert commented 11 months ago

Got this one randomly as well, not as often 🤞 but something to look into probably.

[2024-01-05 14:36:11.802 +01:00] [FTL] [80] Main: Unhandled Exception
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.RemoveAt(Int32 index)
   at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()

Version: 10.8.13 Operating System: Darwin Architecture: X64

fernvenue commented 3 months ago

Can be reproduced on version 10.9.9.

fernvenue commented 3 months ago

Here's the log information from my Jellyfin server:

[2024-08-17 21:08:06.139 +06:00] [FTL] [20] Main: Unhandled Exception
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.Remove(T item)
   at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
sankukai44 commented 3 months ago

HI, I have the same issue, i reinstall jellyfin from scratch and again, this error ... i need to restart the server everyday now ...

[2024-08-17 17:53:12.279 +02:00] [FTL] [71] Main: Unhandled Exception

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e) at System.Threading.Tasks.Task.<>c.b__128_1(Object state) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() [2024-08-17 20:19:52.427 +02:00] [INF] [1] Main: Jellyfin version: "10.9.9"

razor2611 commented 1 month ago

Started to happen on mine on version 10.9.11

[09:57:45] [FTL] [162] Main: Unhandled Exception
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
cadric commented 3 weeks ago

Happened here as well. Fedora Server 41 Running as Podman systemd service.

journalctl --user -xeu jellyfin.service Nov 07 00:07:47 jellyfin[681401]: at System.Collections.Generic.List`1.Remove(T item) Nov 07 00:07:47 jellyfin[681401]: at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e) Nov 07 00:07:47 jellyfin[681401]: at System.Threading.Tasks.Task.<>c.b__128_1(Object state) Nov 07 00:07:47 jellyfin[681401]: at System.Threading.QueueUserWorkItemCallback.Execute() Nov 07 00:07:47 jellyfin[681401]: at System.Threading.ThreadPoolWorkQueue.Dispatch() Nov 07 00:07:47 jellyfin[681401]: at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() Nov 07 00:07:47 jellyfin[681401]: Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')

Nov 07 00:07:47 jellyfin[681401]: at System.Collections.Generic.List`1.Remove(T item) Nov 07 00:07:47 jellyfin[681401]: at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e) Nov 07 00:07:47 jellyfin[681401]: at System.Threading.Tasks.Task.<>c.b__128_1(Object state) Nov 07 00:07:47 jellyfin[681401]: at System.Threading.QueueUserWorkItemCallback.Execute() Nov 07 00:07:47 jellyfin[681401]: at System.Threading.ThreadPoolWorkQueue.Dispatch() Nov 07 00:07:47 jellyfin[681401]: at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() Nov 07 00:07:50 jellyfin[762963]: [🡕] Process 681404 (jellyfin) of user 1000 dumped core.

                                                Stack trace of thread 7075:
                                                #0  0x00007f79e204550f n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x2650f)
                                                #1  0x00007f3828036410 n/a (n/a + 0x0)
                                                ELF object binary architecture: AMD x86-64

â–‘â–‘ Subject: Process 681404 (jellyfin) dumped core â–‘â–‘ Defined-By: systemd â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel â–‘â–‘ Documentation: man:core(5) â–‘â–‘ â–‘â–‘ Process 681404 (jellyfin) crashed and dumped core. â–‘â–‘ â–‘â–‘ This usually indicates a programming error in the crashing program and â–‘â–‘ should be reported to its vendor as a bug.