Closed shayneholmes closed 8 years ago
When does this happen. Does it always happen? Or does it only happen of Simpletask was not running already?
Logcat indicates that Simpletask is not running in the background at this point yet.
This issue us caused by the fact that an item is being added while the todolist is still loading in the background. It's easy to reproduce by killing simpletask and doing a note to self.
Only way to prevent race conditions like this is to queue changes on the todolist. I am working on a queueing mechanism for this, but that takes some time. For now add a widget somewhere to ensure simpletask is running in the background.
@shayneholmes could you please retest with the version at http://mpcjanssen.nl/files/simpletask/latest ?
Tested and verified it worked right once, will check over the next day for assurance. Thanks! On Jul 8, 2015 9:24 AM, "Mark Janssen" notifications@github.com wrote:
@shayneholmes https://github.com/shayneholmes could you please retest with the version at http://mpcjanssen.nl/files/simpletask/latest ?
— Reply to this email directly or view it on GitHub https://github.com/mpcjanssen/simpletask-android/issues/266#issuecomment-119649192 .
With about 24 hours on this change, I haven't been able to reproduce the bug. I also checked it out with the "kill-first" step you outlined, both online and off-, and no problems. I'll go ahead and close this.
Okay, so I've seen this crop up once again; I will watch it over the next few days' usage and post back here if I see anything untoward.
I had problem with urls from "share" menu today as well and my todo.txt is empty (in cloudless version it's problematic, dropbox keeps old versions). @mpcjanssen , can you add versioning? E.g. move todo.txt to todo-{timestamp}.txt before any change will save A LOT of time if this issue occurs in the future.
Old versions are stored in an internal sqlite database. For now you can share the whole db and extract with a salute editor. Next release will have a built in history viewer. In the meantime I will keep investigating this issue.
@kai11 and @shayneholmes can you share your log files with me when this happens (preferably after updating to the latest version from https://mpcjanssen.nl/files/simpletask/latest) I have no clue why this is happening.
I was able to reproduce this issue on my device. So I can look into a fix.
Of course as soon as I have said I can reproduce it and have added logging, it doesn't occur anymore.
I've got the latest debug (22 July) installed, will keep an eye out for this again.
@shayneholmes the current playstore version is actually newer.
Thanks for the pointer, I've got that one now. I'll keep using it on Dropbox and will be background adding about daily; I'll update here and mail logs if I see the overwrite.
I am currently running a tasker action in the background as well. Haven't seen any issues.
On Fri, Jul 24, 2015, 18:23 Shayne Holmes notifications@github.com wrote:
Thanks for the pointer, I've got that one now. I'll keep using it on Dropbox and will be background adding about daily; I'll update here and mail logs if I see the overwrite.
— Reply to this email directly or view it on GitHub https://github.com/mpcjanssen/simpletask-android/issues/266#issuecomment-124572259 .
With the queuing I am pretty convinced this is fixed. Please re-open if this re-occurs.
@shayneholmes Could you share your tasker Task/Profile?
I am going to work to add more automation in todo management (add task by mail / whatsapp, show task for current location / ... ) and your work could be a good starting point.
Thanks. Domenico
I have a Tasker task that adds items to my todo.txt programmatically via the background task intent. Since recently (the new Dropbox core sync API?), this action will occasionally overwrite my todo.txt with an empty (technically 2-byte, I'm guessing just the the utf-8 bom) file. I can get it back through the Dropbox deleted versions, but this would otherwise be a data loss issue.
Expected: Todo.txt has "A/B"
Actual: Todo.txt is empty. The last version on Dropbox is "A"; Dropbox never sees the "B" item.
I've installed the latest debug version (5.5.7); I've got a logcat that I took just after this occurred again, which I have pasted here: https://gist.github.com/shayneholmes/e2ef30340f92b6feb5af