AntonyCorbett / JWLMerge

Utility to merge jwlibrary backup files
MIT License
198 stars 33 forks source link

Lost underlining and bookmarks in merge between JWL Apps on Windows and Android #39

Closed ck-- closed 3 years ago

ck-- commented 3 years ago

Describe the bug When merging between Windows and Android, following things are lost:

Configuration of the merge image

Expected behavior Until recently the underlining have been merged too.

Version information

AntonyCorbett commented 3 years ago

@ck-- Thanks for the report. I can't reproduce the issue, but would be happy to investigate further if you can provide the 2 backup files. You can email them to me if you want.

ck-- commented 3 years ago

@AntonyCorbett Thanks for answering. Just sent you the files.

AntonyCorbett commented 3 years ago

@ck-- Consider the first screenshot showing no highlighting in para 17 of the publication. I reset the data in JWL and then imported the Windows backup - there was no highlighting for para 17. I then reset the data again and restored the Android backup - again there was no highlighting in para 17. This obviously explains why there is no highlighting in the merged file. It looks like the backup files themselves may not contain the data you think they do. If you can provide a precise set of instructions that clearly shows the issue then I will investigate further, but at the moment it looks like the merge operation is working properly.

ck-- commented 3 years ago

@AntonyCorbett this sounds like the JWL App itself does incorrect backups. I added the underlines on Android at paras 17ff and then started the backup. So on Android they must be in the file. This is very strange...

AntonyCorbett commented 3 years ago

@ck-- it could be that the database on your android device is corrupt. I'll close the issue, but please let me know if you find out more.

ck-- commented 3 years ago

@AntonyCorbett How can I find that out whether it is corrupt? How can that happen? I have iteratively and weekly merged data from 2 and then 3 devices for at least 6 iterations. Could that have caused the corruption?

ck-- commented 3 years ago

@AntonyCorbett Could you please also have a look whether in UserDataBackup_2021-03-04_CK-SURPRO.jwlibrary para 16 has correct underlines? Or can you tell me how I can find out myself?

AntonyCorbett commented 3 years ago

@ck-- The JWL database is not particularly resilient to crashes and doesn't have comprehensive integrity constraints, so it is prone to corruption. However, the usual symptom is that JWL won't load or crashes regularly.

AntonyCorbett commented 3 years ago

@ck-- You can tell what is in your backup file by resetting your data on Windows (Uninstall Programs => JWL => Advanced => Reset) and then importing the backup file.

AntonyCorbett commented 3 years ago

@ck-- Further to the above, there's an interesting article on the SQLite website regarding database corruption: https://www.sqlite.org/howtocorrupt.html In addition to this there is the potential for loss of internal integrity in any database schema where relevant constraint checks are missing. The JWL database schema is updated occasionally to include additional checks.