Closed CtrlAltDefeat94 closed 6 years ago
Attempted to recreate groups with grouping turned off, resulted in the following error
[2018-07-21 16:23:32:006] Error|MonoMethod.Invoke => MonoMethod.InternalInvoke => ShokoServiceImplementation.RecreateAllGroups System.NullReferenceException: Object reference not set to an instance of an object
at System.Linq.Enumerable+<SelectManyIterator>d__167`3[TSource,TCollection,TResult].MoveNext () [0x00060] in <521f3fe476f34ea88748e97b3b984d05>:0
at System.Linq.Lookup`2[TKey,TElement].Create[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x00031] in <521f3fe476f34ea88748e97b3b984d05>:0
at System.Linq.Enumerable.ToLookup[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x0002a] in <521f3fe476f34ea88748e97b3b984d05>:0
at System.Linq.Enumerable.ToLookup[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector) [0x00000] in <521f3fe476f34ea88748e97b3b984d05>:0
at Shoko.Server.Repositories.Cached.GroupFilterRepository+<>c__DisplayClass28_0.<CalculateAnimeSeriesPerTagGroupFilter>b__7 (System.Int32 key) [0x00000] in /usr/src/app/source/Shoko.Server/Repositories/Cached/GroupFilterRepository.cs:685
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x00096] in <521f3fe476f34ea88748e97b3b984d05>:0
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector) [0x00000] in <521f3fe476f34ea88748e97b3b984d05>:0
at Shoko.Server.Repositories.Cached.GroupFilterRepository.CalculateAnimeSeriesPerTagGroupFilter (Shoko.Server.Repositories.NHibernate.ISessionWrapper session) [0x0010c] in /usr/src/app/source/Shoko.Server/Repositories/Cached/GroupFilterRepository.cs:685
at Shoko.Server.Tasks.AnimeGroupCreator.UpdateGroupFilters (Shoko.Server.Repositories.NHibernate.ISessionWrapper session) [0x00024] in /usr/src/app/source/Shoko.Server/Tasks/AnimeGroupCreator.cs:190
at Shoko.Server.Tasks.AnimeGroupCreator.RecreateAllGroups (Shoko.Server.Repositories.NHibernate.ISessionWrapper session) [0x001ef] in /usr/src/app/source/Shoko.Server/Tasks/AnimeGroupCreator.cs:510
at Shoko.Server.Tasks.AnimeGroupCreator.RecreateAllGroups () [0x0000b] in /usr/src/app/source/Shoko.Server/Tasks/AnimeGroupCreator.cs:525
at Shoko.Server.ShokoServiceImplementation.RecreateAllGroups (System.Boolean resume) [0x00000] in /usr/src/app/source/Shoko.Server/API/v1/Implementations/ShokoServiceImplementation/ShokoServiceImplementation_Entities.cs:1798
That is one that I can fix
I pushed something that might help. If it fails, then there's something up in your DB.
In that case run this on your DB.
DELETE FROM GroupFilter WHERE FilterType = 16
and restart the server
Filters are populating again with grouping turned off. With grouping turned on, I managed to get the error from the first post again, however this time just one, rather than 15 inner exceptions(though I doubt that's progress there heh)
I wonder if it's better to drop all tag filters and regenerate them during Recreate All Groups
Should be fixed now
When trying to recreate groups with grouping enabled
[2018-07-22 08:33:22:775] Error|MonoMethod.Invoke => MonoMethod.InternalInvoke => ShokoServiceImplementation.RecreateAllGroups System.NullReferenceException: Object reference not set to an instance of an object
at System.Linq.Enumerable+<SelectManyIterator>d__167`3[TSource,TCollection,TResult].MoveNext () [0x00060] in <521f3fe476f34ea88748e97b3b984d05>:0
at System.Linq.Lookup`2[TKey,TElement].Create[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x00031] in <521f3fe476f34ea88748e97b3b984d05>:0
at System.Linq.Enumerable.ToLookup[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x0002a] in <521f3fe476f34ea88748e97b3b984d05>:0
at System.Linq.Enumerable.ToLookup[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector) [0x00000] in <521f3fe476f34ea88748e97b3b984d05>:0
at Shoko.Server.Repositories.Cached.GroupFilterRepository+<>c__DisplayClass29_0.<CalculateAnimeSeriesPerTagGroupFilter>b__8 (System.Int32 key) [0x00000] in /usr/src/app/source/Shoko.Server/Repositories/Cached/GroupFilterRepository.cs:709
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x00096] in <521f3fe476f34ea88748e97b3b984d05>:0
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector) [0x00000] in <521f3fe476f34ea88748e97b3b984d05>:0
at Shoko.Server.Repositories.Cached.GroupFilterRepository.CalculateAnimeSeriesPerTagGroupFilter (Shoko.Server.Repositories.NHibernate.ISessionWrapper session) [0x000fb] in /usr/src/app/source/Shoko.Server/Repositories/Cached/GroupFilterRepository.cs:709
at Shoko.Server.Tasks.AnimeGroupCreator.UpdateGroupFilters (Shoko.Server.Repositories.NHibernate.ISessionWrapper session) [0x00024] in /usr/src/app/source/Shoko.Server/Tasks/AnimeGroupCreator.cs:190
at Shoko.Server.Tasks.AnimeGroupCreator.RecreateAllGroups (Shoko.Server.Repositories.NHibernate.ISessionWrapper session) [0x001ef] in /usr/src/app/source/Shoko.Server/Tasks/AnimeGroupCreator.cs:510
at Shoko.Server.Tasks.AnimeGroupCreator.RecreateAllGroups () [0x0000b] in /usr/src/app/source/Shoko.Server/Tasks/AnimeGroupCreator.cs:525
at Shoko.Server.ShokoServiceImplementation.RecreateAllGroups (System.Boolean resume) [0x00000] in /usr/src/app/source/Shoko.Server/API/v1/Implementations/ShokoServiceImplementation/ShokoServiceImplementation_Entities.cs:1798
All groups are now empty, as seen in an earlier screenshot. Turning off grouping, running the query and then restarting shoko allows me to recreate the groups again, but only without grouping enabled.
I just noticed that after recreating groups with grouping disabled(after I did above mentioned), all shows are grouped according to the settings used before the crash(so, settings are set to not use grouping, but shows are grouped anyway)
WTF. @CtrlAltDefeat I think there's something seriously up with your DB. It's throwing nullpointers in places that should never be null. I'll try to make it run again, but you may end up with strange errors later that seem to make no sense.
Try with latest commit
@da3dsoul the "corrupt db" is in most cases because some errors in server ;-)
@ctrlaltdefeat what was the status with latest? I know that you said it doesn't work, but I'd like a stack
This was from my latest try https://gist.github.com/CtrlAltDefeat94/ce7226c3421af531ed69cf2a3639f8ce
Those are MySQL timeouts..... They aren't explicitly related. Are those common? I haven't seen them on Windows, but I don't use MySQL, either, so....
@da3dsoul no, no mysql timeout normaly. But I dont recreate groups.
Just a heads up, yall keep @ ing me instead of @CtrlAltDefeat94 @da3dsoul
Wait! Who are you?
@CtrlAltDefeat change your name, problem solved :)
Ha, yeah.. Alternatively just pay attention to the actual username of whoever you're pinging :p Good luck on your project! No worries obviously, figured I'd give daed(?) soul over there the heads up.
Yeah, I wouldn't have noticed if you didn't say. Have fun with whatever. We make an anime metadata manager if you ever need one
Issue appears to be resolved on f548b39444f44ab897fbcf9647fb771d4abdab8c
On commit: 691f6b5ecae875dd465134c09d55b8a092d997be
Seems recreating groups broke my groups entirely:
Log: https://gist.github.com/CtrlAltDefeat94/8a3d07f8c1f4a1f6d6dc585b748e0c3a