Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.8.26 - Wrong content created at the end of file #395

Open
1 task done
Sergey-Makarov opened this issue Nov 1, 2024 · 2 comments · Fixed by #402
Open
1 task done

1.8.26 - Wrong content created at the end of file #395

Sergey-Makarov opened this issue Nov 1, 2024 · 2 comments · Fixed by #402
Labels
bug Something isn't working

Comments

@Sergey-Makarov
Copy link

  • I have searched for existing issues that may be the same as or related to mine.

Devices: Samsung Galaxy Fold 4 (Android 14) / Emulator (Android 13)
Orgzly Revived Version: 1.8.28 from FDroid
Sync repository type (directory/Dropbox/WebDAV/Git): directory

Hey guys! Recently, I was constantly finding myself in a situation when the end of the notes file was somewhat broken.
Reproduction steps were not obvious, i.e. it could happen in various circumstances.

But, luckily, I was able to find a way to reliably reproduce the bug.
Here is a 83-sec demo video with all the steps needed. On this emulator, the app had never been launched before and has a fully clean state. No synchronisation software that could anyhow affect the result is running, either.
https://github.com/user-attachments/assets/461f7417-0bb0-4475-87d9-66e5b2d79a43

@Sergey-Makarov Sergey-Makarov added the bug Something isn't working label Nov 1, 2024
@amberin
Copy link
Member

amberin commented Nov 1, 2024

Great work in reproducing in such a clear way! This is so odd. It feels like it could be related to #385.

amberin added a commit that referenced this issue Nov 7, 2024
Before 43d88fd, this was not needed, because the file was always deleted
and re-created first.

This should resolve issues #385 and #395.
@amberin amberin linked a pull request Nov 8, 2024 that will close this issue
@amberin
Copy link
Member

amberin commented Nov 14, 2024

I'll re-open this and pin it, to allow linking to it from the change log. Just in case more people start to notice weird content appearing in their files, resulting from this bug.

When did the bug appear?

The bug appeared in Orgzly Revived 1.8.26.

When was the bug fixed?

The bug was fixed in Orgzly Revived 1.8.30.

Have I lost data in my notebooks??

No data has been lost, but you may have gotten broken extra data at the end of your notebook files. This would appear in the last note as partial content, and that note could of course later have been moved to some other location, without you noticing the extra content.

The issue was that files were being overwritten without being truncated, so if your update removed content from the notebook, the end of the synced file would still contain old, partial data.

For someone to end up with this type of garbled data which actually stays in your files, though, you must have made changes to the damaged file on another device, so that Orgzly has read back its content at some point. If you did not make changes on another device while this bug was present, Orgzly would just save a bad file, but its own view of your notebook would stay correct.

@amberin amberin changed the title 1.8.28 - Wrong content created at the end of file 1.8.26 - Wrong content created at the end of file Nov 14, 2024
@amberin amberin reopened this Nov 14, 2024
@amberin amberin pinned this issue Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants