K1rakishou / Kuroba-Experimental

Free and open source image board browser
GNU General Public License v3.0
629 stars 36 forks source link

Foreground Thread Watcher can be inconsistent #1028

Open lewri opened 2 months ago

lewri commented 2 months ago

I've noticed at times that the thread watcher doesn't always reliably go off and check your bookmarked threads when the app is open and in use. This is also the case where setting the poll interval to 30s. Adaptive interval is off.

Sometimes the watcher only seems to go check one of two threads, while others get new posts but aren't updated at all. If you fully close down the app and reopen it you can see that it will properly poll all bookmarked threads.

Version 1.3.33.0

K1rakishou commented 2 months ago

Would be nice to see logs. Maybe there is a silent crash happening when one of the bookmarks is updated which then prevents other bookmarks from being updated.

lewri commented 2 months ago

Here's some logs logs.txt

Edit: I actually just noticed one thread actually failed to update the bookmark on launch. A reply came in an hour ago and was never detected.

K1rakishou commented 2 months ago

BookmarkWatcherDelegate: doWorkInternal() updating 1 bookmarks

So, according to the logs only one bookmark is being updated: a bookmark for a thread that you are currently viewing. There is supposed to be another updater working when the app is in foreground for other active bookmarks but I don't see it in the logs so it's probably not working.

So far it looks like foreground updater got stopped (which is fine when you minimize the app, for example) but wasn't restarted again for some reason.

Can you try adding a new bookmark and then checking if it fixes anything? Also, can you enable verbose logs in the developer settings before that?

K1rakishou commented 2 months ago

Ok I have added foreground watcher restarting logic in two more places so it shouldn't be completely killed anymore. Try the latest beta once it's done building.

lewri commented 2 months ago

Okay that change appears to be working better now 👍

Can you try adding a new bookmark and then checking if it fixes anything?

To confirm new bookmark woke up the watcher to execute

K1rakishou commented 2 months ago

Okay, then will try to make a stable release today.