Jump to content

Statistics keeps failing


nightknight

Recommended Posts

nightknight

I am new to emby. i have  a very large media library. Why is the staticits for all users task failing?

 

Im using latest verison of both plugin and emby/premeir, how can i figure out exactly what its complaining about .

The error appears to be 

System.OverflowException: System.OverflowException: Arithmetic operation resulted in an overflow.
at System.Linq.Enumerable.Sum[TSource](IEnumerable`1 source, Func`2 selector)
 
but i dont know whats causing the overflow?

 

*** Error Report ***
Version: 4.7.8.0
Command line: C:\Users\User\AppData\Roaming\Emby-Server\system\EmbyServer.dll
Operating system: Microsoft Windows 10.0.22622
Framework: .NET 6.0.9
OS/Process: x64/x64
Runtime: C:/Users/User/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
Processor count: 12
Data path: C:\Users\User\AppData\Roaming\Emby-Server\programdata
Application path: C:\Users\User\AppData\Roaming\Emby-Server\system
System.OverflowException: System.OverflowException: Arithmetic operation resulted in an overflow.
at System.Linq.Enumerable.Sum[TSource](IEnumerable`1 source, Func`2 selector)
at statistics.Calculators.BaseCalculator.GetOwnedEpisodesCount(Series show)
at Statistics.Helpers.ShowProgressCalculator.CalculateShowProgress(UpdateModel tvdbData)
at Statistics.ScheduledTasks.CalculateStatsTask.<>c__DisplayClass19_1.<MediaBrowser.Model.Tasks.IScheduledTask.Execute>b__0()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
Source: System.Linq
TargetSite: System.Nullable`1[System.Int32] Sum[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Nullable`1[System.Int32]])

 

Edited by nightknight
Link to comment
Share on other sites

Hello nightknight,

** This is an auto reply **

Please wait for someone from staff support or our members to reply to you.

It's recommended to provide more info, as it explain in this thread:


Thank you.

Emby Team

Link to comment
Share on other sites

hackthis02

@nightknight 
Have you used this plugin successfully before this issue?
Do you have debug logging enabled, if not could you run it again with it enabled and give me that log?
When you say very large media library, how large are we talking about?

Link to comment
Share on other sites

nightknight
37 minutes ago, hackthis02 said:

@nightknight 
Have you used this plugin successfully before this issue?
Do you have debug logging enabled, if not could you run it again with it enabled and give me that log?
When you say very large media library, how large are we talking about?

No its never gotten to 100% it was failing at 7% just now with debugging 14% when i first installed it was 84%. To some people maybe not that large. like 10-15tb. I sent the log to your inbox.

Link to comment
Share on other sites

hackthis02

I had to revert the change I made that fixed your issue. Since it's only happening to you, I believe it's something to do with your library. I would suggest removing all your TV shows from your library then adding them back individually, running the plugin between each. That should help you find which show(s) is giving you the issue.

Link to comment
Share on other sites

nightknight
3 hours ago, hackthis02 said:

I had to revert the change I made that fixed your issue. Since it's only happening to you, I believe it's something to do with your library. I would suggest removing all your TV shows from your library then adding them back individually, running the plugin between each. That should help you find which show(s) is giving you the issue.

I guess I really don't have an option. It would be better if the expecting handler was more specific other than some variable overflowing.

 

When are you pushing the update. My server still hasn't discovered any update I dont think. Atleast statistics is still working

Edited by nightknight
Link to comment
Share on other sites

Happy2Play
4 minutes ago, nightknight said:

I guess I really don't have an option. It would be better if the expecting handler was more specific other than some variable overflowing.

 

When are you pushing the update. My server still hasn't discovered any update I dont think. Atleast statistics is still working

Restart your server to trigger update check or wait as the task runs every 24 hours.  Or you can manually run the task from the API.

//Check for plugin updates//
curl -X POST "http://localhost:8096/emby/ScheduledTasks/Running/c27fda37dfb6e39be141191aaa1c3060?api_key={yourapikey}" -d ""

 

  • Like 1
Link to comment
Share on other sites

nightknight

I found the problem. in a series i have the names of the eipsodes were like this,

 

ep.27.v0.1656282908.360 [ep.27.v0.1656282908.360].mp4

Im guessing this part is the main culprit "0.1656282908.360"

After fixing that the problem went away. thanks

Edited by nightknight
Link to comment
Share on other sites

Happy2Play

That is odd but I am guessing this would have been an episode that was technically unidentified.

But glad you were able to figure it out.

  • Thanks 1
Link to comment
Share on other sites

  • 4 weeks later...
nightknight

What do you think is cusing this error?

 

Data path: C:\Users\User\AppData\Roaming\Emby-Server\programdata
Application path: C:\Users\User\AppData\Roaming\Emby-Server\system
System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
at Statistics.Helpers.Calculator.CalculateMovieQualities()
at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
Source: statistics
TargetSite: statistics.Models.Configuration.ValueGroup CalculateMovieQualities()

 

Link to comment
Share on other sites

Happy2Play
11 hours ago, nightknight said:

What do you think is cusing this error?

 

Data path: C:\Users\User\AppData\Roaming\Emby-Server\programdata
Application path: C:\Users\User\AppData\Roaming\Emby-Server\system
System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
at Statistics.Helpers.Calculator.CalculateMovieQualities()
at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
Source: statistics
TargetSite: statistics.Models.Configuration.ValueGroup CalculateMovieQualities()

 

Will guess what I report in other topic several post up in linked topic and a way to find bad episodes

 

Link to comment
Share on other sites

nightknight

but what is the error. the software dont give you many details from tghe exception handling. 

 

System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
at Statistics.Helpers.Calculator.CalculateMovieQualities()

is this a title name/metadata ? 

Link to comment
Share on other sites

Happy2Play
2 minutes ago, nightknight said:

but what is the error. the software dont give you many details from tghe exception handling. 

 

System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
at Statistics.Helpers.Calculator.CalculateMovieQualities()

is this a title name/metadata ? 

If the same issue I linked it is technically unidentified episodes in the database.  But yes the exception is rather useless.

Link to comment
Share on other sites

nightknight

what does this mean exactly, 

at Statistics.Helpers.Calculator.CalculateMovieQualities()

you mention episode but should i be looking at movies or tv shows? im not sure how the code works so i dont know what CalculateMovieQualities() is for just movies or tv shows?

Link to comment
Share on other sites

Happy2Play
9 minutes ago, nightknight said:

what does this mean exactly, 

at Statistics.Helpers.Calculator.CalculateMovieQualities()

you mention episode but should i be looking at movies or tv shows? im not sure how the code works so i dont know what CalculateMovieQualities() is for just movies or tv shows?

Not a coder but it is part of the calculation process ie the plugin landing page and while trying to calculate your stats if fails do to bad database information.

Edited by Happy2Play
Link to comment
Share on other sites

  • 2 weeks later...
nightknight

i still havnt figured out why statistics keeps failing. ive gon through any new movies i recently added but im still gettings errors. I mean how hard would it be to log more detailed information about the error.. 

 

*** Error Report ***
Version: 4.8.0.17
Command line: C:\Users\Laptop\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
Operating system: Microsoft Windows 10.0.22623
Framework: .NET 6.0.10
OS/Process: x64/x64
Runtime: C:/Users/Laptop/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
Processor count: 12
Data path: C:\Users\Laptop\AppData\Roaming\Emby-Server\programdata
Application path: C:\Users\Laptop\AppData\Roaming\Emby-Server\system
System.ArgumentOutOfRangeException: 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.get_Item(Int32 index)
at Statistics.Helpers.Calculator.CalculateMostWatchedShows(UpdateModel tvdbData)
at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
Source: System.Private.CoreLib
TargetSite: Void ThrowArgumentOutOfRange_IndexException()

 

Link to comment
Share on other sites

nightknight

your program might be broken. ive tried as much as i can. stats fails regardless of empty foler/1 movies etc. i tried lib scans, restarts, metaldata scans. what elese can i do?

 

*** Error Report ***
Version: 4.8.0.19
Command line: C:\Users\Laptop\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
Operating system: Microsoft Windows 10.0.22623
Framework: .NET 6.0.10
OS/Process: x64/x64
Runtime: C:/Users/Laptop/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
Processor count: 12
Data path: C:\Users\Laptop\AppData\Roaming\Emby-Server\programdata
Application path: C:\Users\Laptop\AppData\Roaming\Emby-Server\system
System.ArgumentOutOfRangeException: 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.get_Item(Int32 index)
at Statistics.Helpers.Calculator.CalculateMostWatchedShows(UpdateModel tvdbData)
at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
Source: System.Private.CoreLib
TargetSite: Void ThrowArgumentOutOfRange_IndexException()

 

Edited by nightknight
Link to comment
Share on other sites

  • 2 weeks later...
hackthis02

Sorry, I didn't know this thread was still active. The issue as we've come to understand it isn't with movies, but with TV shows. Here is what others have done to fix the issue.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...