Lacro59 / playnite-successstory-plugin

This plugin shows the game achievements in Playnite.
https://playnite.link
MIT License
162 stars 29 forks source link

Plugin prevents library data changes to be propagated during library update #509

Closed JosefNemec closed 1 week ago

JosefNemec commented 3 weeks ago

Describe the bug I don't use the plugin myself but this has been reported by multiple people by now on Discord and other places. When the plugin is installed, and any data changes happen during library update, those changes won't get propagated to the UI via library change events.

My only guess is that you are somewhere using extra buffered library updates but not actually ever ending those updates, so buffer stays in "opened" state forever and never ends up sending updates to the UI.

To Reproduce Have latest version of SS installed, start library update that should result in new games being added, those games won't appear in the game list until you restart Playnite completely.

Extensions log I don't use SS myself but can request logs from people reporting this on Discord if needed.

JosefNemec commented 3 weeks ago

Btw this is imo major issue, especially since it's not immediately clear that it's caused by your plugin.

JosefNemec commented 3 weeks ago

One last thing, please consider removing the update from update manifest temporarily until you fix this because your update released around the same time as the latest 10.34 Playnite update and people are reporting this to me as Playnite update issue. It's also combined with performance issues in this new SS update that's making it look like the latest Playnite update is the culprit and not SS.

Lacro59 commented 3 weeks ago

I have removed the latest version of the manifest. I've started to look at this problem but I can't reproduce it despite several attempts. Do you have any log files with the anomaly?

JosefNemec commented 3 weeks ago

I asked some users to post their logs here.

ElTioRata commented 3 weeks ago

Where's the Discord link?

fIows commented 3 weeks ago

My extensions.log file.

Lacro59 commented 3 weeks ago

@JosefNemec, for information. I found the problem. For background updating I use BeginBufferUpdate and EndBufferUpdate. If a library update starts during this task, the library is not refreshed until after EndBufferUpdate of my update. Even if other EndBufferUpdate is called.

JosefNemec commented 3 weeks ago

SDK API is not fully thread safe so situations like this are not supported and issues are expected. Make single batch update on main thread after you have all data ready.