Kuroba-Experimental icon indicating copy to clipboard operation
Kuroba-Experimental copied to clipboard

Foreground Thread Watcher can be inconsistent

Open lewri opened this issue 11 months ago • 6 comments

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

lewri avatar Mar 06 '24 11:03 lewri

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.

K1rakishou avatar Mar 06 '24 12:03 K1rakishou

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.

lewri avatar Mar 06 '24 13:03 lewri

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 avatar Mar 06 '24 16:03 K1rakishou

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.

K1rakishou avatar Mar 06 '24 16:03 K1rakishou

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

lewri avatar Mar 06 '24 17:03 lewri

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

K1rakishou avatar Mar 07 '24 05:03 K1rakishou