Closed btittelbach closed 4 years ago
Thank you for this very clear issue report. Is this a recent issue or did it also occur on older versions?
I can't reproduce this at the moment. Will investigate further. Is anything else touching todo.txt besides Simpletask?
The current logging doesn't seem to include a case where a change was made on dropbox. Could you get a new logging directly after the issue occurred?
well, the bug happened regularly multiple times a day ... until I ready your post and tried to replicate the issue once more for a new debug log. Since then... is has not occured. Will post a debug log, as soon as the issue reappears, though I hope it does not.
I have had more reports of this issue. Will investigate as soon as I have some time.
I've run into this. I'm syncing with nextcloud. On my PC todo.txt is updated by todour.
Not sure if this is helpful because I'm unable to confirm, however I'm sure that the first time I ran into this I "fixed it" by force closing simpletask, or maybe just by using the sync option in the UI. (sorry I can't remember which).
More recently, when force closing / syncing didn't work, I noticed that the duplicates had actually been written to todo.txt.
I guess I'm saying, is it possible that items are duplicated in the simpletask interface, and thereafter they may be written to todo.txt in certain circumstances? It seems like I've encountered both:
Frustratingly, I can't replicate the issue at this time. I seem to be able to make changes from both simpletask and from todour without issue.
I don't think it will solve the issue. But the latest versions on https://www.mpcjanssen.nl/artifacts/ should at least improve the logging. Could you try with a version from there.
The issue reappeared after I added a few todos on my phone. No other device connected to that dropbox account was online for the last 24h, so the todo.txt file was not modified externaly.
not sure how useful the debuglog is though. One of the first lines states Config : Getting 804 items todoList from cache
which is already twice as many items as there should be.
Happened again. This time I believe the new debuglog finally shows relevant information. :-)
It seems to be a race condition triggered when a Simpletask alarm is pending in the background (for example to update widgets after midnight) and where in the mean time the app itself is also loading the task list because it is started.
Do you have battery saving enabled for Simpletask?
@btittelbach could you try again with the latest test build from https://mpcjanssen.nl/artifacts?
Battery saving is the default and SimpleTask is not being explicitly excepted so probably yes.
I installed the latest test build, will see how that goes. It seems to display the same version number though.
Btw: I observed the following: If duplicates are shown and if I then use "Open tasklist file" to re-open the current todo.txt before adding a new todo item, the duplicates are gone.
Only if I add a new task while duplicates are shown, will the (cached?) duplicated list saved to dropbox.
yes that behaviour seems to indicate there is a duplication issue while loading from file or cache. this incorrect list will only be saved after a local change.
I was just about to report this issue when I found this existing one. I've encountered the duplication of todo.txt
three times in the past weeks (while using the app a few times a week). I'm mostly managing my todo list on the PC using todo.txt-cli. Since the first occurrence, I take great care to wait for the app to finish syncing (i.e. for the rotating blue line at the bottom to disappear) before working with the app, but it still seems to happen.
I also had the "duplicated in the app, but not in the todo.txt
file" issue once; I think I had to sign out of Dropbox and then sign in again for it to disappear.
It's great that this is being worked on, as it's quite annoying!
@inkarkat would you also be willing to test with a development build from https://mpcjanssen.nl/artifacts ?
Happy to report, so far, since installing the development build, I have not encounterd the issue.
@btittelbach thanks for confirming. I will prepare a new release.
Heads up, that the issue reappeared with the PlayStore update from March 28th to Version "Simpletask dropbox v10.5.1" It is also seems to happen more frequently now.
Probably introduced by removing all synchronisation to fix slow startup. Will investigate again
Unintended side effect of the fix for #1043 . Will try to fix it using another approach than global code locking.
@btittelbach can you try again with a version from https://www.mpcjanssen.nl/artifacts/10.5.1-7-2c2f6ea/ I used a different way to hopefully fix this issue without reintroducing #1043 .
Installed it and will report.
Btw: it seems the bug behaved slightly differently now, in that sometimes reopening the todo.txt file in Simpletask would remove the duplicates. Unless you add a task, then the duplicates are saved to DB.
Btw: saw there is a dokuwiki version of Simpletask: awesome 😁
I use the dokuwiki version exclusively myself.
Happy to report: Have not experienced any issues with duplicates in the last seven days.
Thanks for letting me know.
How to reproduce issue:
Observations:
Settings
Debug Log