Happy2Play 8242 Posted May 21, 2021 Share Posted May 21, 2021 (edited) Was just going to link to the issue identified via other topic showing the unhandled exception. https://emby.media/community/index.php?/topic/98118-post-46050-update-library-scan-never-completes/&do=findComment&comment=1022849 Edited May 21, 2021 by Happy2Play Link to comment Share on other sites More sharing options...
grafxxx 4 Posted May 21, 2021 Share Posted May 21, 2021 So after reinstalling the plugin the server crashes after a library scan again. BUT before it crashes, it sends enriched info to discord ;). But as you can see on the image it's doubled. One time enriched and the other blank. embyserver-63757189974.txt Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 21, 2021 Share Posted May 21, 2021 4 hours ago, grafxxx said: So after reinstalling the plugin the server crashes after a library scan again. BUT before it crashes, it sends enriched info to discord ;). But as you can see on the image it's doubled. One time enriched and the other blank. embyserver-63757189974.txt 172.13 kB · 3 downloads Looks like it processed a bunch of them then failed on one. Maybe a timing thing. Since I don't run the thing I won't be able to debug it. Hopefully someone who uses it can take a look. Link to comment Share on other sites More sharing options...
rechigo 293 Posted May 21, 2021 Author Share Posted May 21, 2021 (edited) 2 hours ago, BillOatman said: Looks like it processed a bunch of them then failed on one. Maybe a timing thing. Since I don't run the thing I won't be able to debug it. Hopefully someone who uses it can take a look. This issue started popping up a while ago, I think it was around the time when I stopped working on this plugin. It's some edge case somewhere in the metadata checker that causes the entire server to essentially kill itself when it occurs. On other news, I have officially released an update onto Github at long last, the original post has been updated with the new download. https://github.com/oonqt/Emby.Notifications.Discord/releases/tag/1.1.1.2 Unfortunately for Beta users, you will have to wait until the next cycle of Beta releases as I was unable to build the plugin against the Emby Server 4.6.0.48 SDK as it was removed from NuGet. This should only take a week or two for the new betas to come out hopefully. Edited May 21, 2021 by rechigo 1 Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 21, 2021 Share Posted May 21, 2021 (edited) 5 hours ago, rechigo said: This issue started popping up a while ago, I think it was around the time when I stopped working on this plugin. It's some edge case somewhere in the metadata checker that causes the entire server to essentially kill itself when it occurs. On other news, I have officially released an update onto Github at long last, the original post has been updated with the new download. https://github.com/oonqt/Emby.Notifications.Discord/releases/tag/1.1.1.2 Unfortunately for Beta users, you will have to wait until the next cycle of Beta releases as I was unable to build the plugin against the Emby Server 4.6.0.48 SDK as it was removed from NuGet. This should only take a week or two for the new betas to come out hopefully. I think the issue might stem from the fact that the code is adding/removing from that dictionary asynchronously and dictionaries are not thread safe. Quote A Dictionary can support multiple readers concurrently, as long as the collection is not modified. Even so, enumerating through a collection is intrinsically not a thread-safe procedure. In the rare case where an enumeration contends with write accesses, the collection must be locked during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization. For a thread-safe alternative, see ConcurrentDictionary. Edited May 21, 2021 by BillOatman 1 Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 21, 2021 Share Posted May 21, 2021 OK brave people ... I replaced that questionable dictionary code and rebuilt. I make no guarantees on what it will do as I cannot run it. If you like, particularly high volume people that see this problem, give it a try. Emby.Notifications.Discord1113.dll.zip Link to comment Share on other sites More sharing options...
rechigo 293 Posted May 21, 2021 Author Share Posted May 21, 2021 2 hours ago, BillOatman said: I think the issue might stem from the fact that the code is adding/removing from that dictionary asynchronously and dictionaries and not thread safe. And here my lack of C# knowledge shines, hopefully that is the issue. Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 22, 2021 Share Posted May 22, 2021 Any feedback? If it is working for people I'll get it to rechigo to release. Link to comment Share on other sites More sharing options...
GrimReaper 3269 Posted May 22, 2021 Share Posted May 22, 2021 16 minutes ago, BillOatman said: Any feedback? If it is working for people I'll get it to rechigo to release. 113 working fine here on 4.6.0.50. Occasional hiccup when larger number of items (10+) added simultaneously, part of notifications come through un-enriched, but no server crashes, can live with that trade. Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 22, 2021 Share Posted May 22, 2021 5 minutes ago, GrimReaper76 said: 113 working fine here on 4.6.0.50. Occasional hiccup when larger number of items (10+) added simultaneously, part of notifications come through un-enriched, but no server crashes, can live with that trade. Yeah that's the situation that was crashing it before I believe. I can try something later that might help. Thanks. Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 22, 2021 Share Posted May 22, 2021 New test version that replaces dictionaries with queues. Hopefully should not crash and should always send the rich data notifications. This is a significant change so consider that a beta version. Debug log if there are any issues please. Emby.Notifications.Discord1200.dll.zip 1 Link to comment Share on other sites More sharing options...
rechigo 293 Posted May 22, 2021 Author Share Posted May 22, 2021 Also, FYI, beta users should be able to run the plugin on the 4.6.0.51+ beta builds now. Link to comment Share on other sites More sharing options...
grafxxx 4 Posted May 23, 2021 Share Posted May 23, 2021 15 hours ago, BillOatman said: New test version that replaces dictionaries with queues. Hopefully should not crash and should always send the rich data notifications. This is a significant change so consider that a beta version. Debug log if there are any issues please. Emby.Notifications.Discord1200.dll.zip 54.89 kB · 3 downloads Testing now and will report back. Link to comment Share on other sites More sharing options...
grafxxx 4 Posted May 23, 2021 Share Posted May 23, 2021 So Server is not crashing anymore, but I don't get any enriched info at all. Before it was crashing and I received Info double (1x enriched & 1x blank). Attached Log with debug embyserver.txt Link to comment Share on other sites More sharing options...
zeenix 0 Posted May 23, 2021 Share Posted May 23, 2021 21 hours ago, BillOatman said: New test version that replaces dictionaries with queues. Hopefully should not crash and should always send the rich data notifications. This is a significant change so consider that a beta version. Debug log if there are any issues please. Emby.Notifications.Discord1200.dll.zip 54.89 kB · 4 downloads Work well on 4.6.0.51-beta. Thanks !! Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 23, 2021 Share Posted May 23, 2021 (edited) Another test please, trying to get metadata (rich data) back. It seems, based on comments in the code and what we are seeing, that Emby says the new material is available before it has gotten its metadata. This attempts to handle it. A debug log even if it works would be helpful as well please. Emby.Notifications.Discord1201.dll.zip Edited May 23, 2021 by BillOatman 2 Link to comment Share on other sites More sharing options...
BaukeZwart 94 Posted May 23, 2021 Share Posted May 23, 2021 (edited) Thi This was with build 1200. Edited May 24, 2021 by BaukeZwart Link to comment Share on other sites More sharing options...
grafxxx 4 Posted May 24, 2021 Share Posted May 24, 2021 Enriched info is back, server not crashing but media info is still doubled (enriched / blank) Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 24, 2021 Share Posted May 24, 2021 2 hours ago, grafxxx said: Enriched info is back, server not crashing but media info is still doubled (enriched / blank) Meaning 2 entries in discord each? Can you send a debug log please? Link to comment Share on other sites More sharing options...
grafxxx 4 Posted May 24, 2021 Share Posted May 24, 2021 (edited) I reactivated debug log and add a new movie now. after scan i post the log here. So scan is succesful but for the movie no enriched data and again a double posting in discord. Log is attached. Thank you so much for your support. embyserver.txt Edited May 24, 2021 by grafxxx Update Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 24, 2021 Share Posted May 24, 2021 2 hours ago, grafxxx said: I reactivated debug log and add a new movie now. after scan i post the log here. So scan is succesful but for the movie no enriched data and again a double posting in discord. Log is attached. Thank you so much for your support. Thanks, I think you deleted something which sent it into a tailspin too Try this with debug logging again please. Emby.Notifications.Discord1202.dll.zip Link to comment Share on other sites More sharing options...
grafxxx 4 Posted May 24, 2021 Share Posted May 24, 2021 Run a scan again and discord picked up the movie but this time just once without enriched data. Really strange. embyserver.txt Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 24, 2021 Share Posted May 24, 2021 @grafxxx Does "Instinct - Gefährliche Begierde (2019)" have metadata from a provider? Link to comment Share on other sites More sharing options...
grafxxx 4 Posted May 24, 2021 Share Posted May 24, 2021 Yes for example moviedb: https://www.themoviedb.org/movie/530743 Link to comment Share on other sites More sharing options...
BillOatman 496 Posted May 24, 2021 Share Posted May 24, 2021 2 hours ago, grafxxx said: Yes for example moviedb: https://www.themoviedb.org/movie/530743 Hmmm. I think I have gone past my ability to work on it without being able to run in the debugger What's in github will have to do until someone who uses this can take the torch Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now