jabref icon indicating copy to clipboard operation
jabref copied to clipboard

JabRef writes corrupted library files that can no longer be read, leading to dataloss

Open mocherry opened this issue 3 years ago • 5 comments

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows 10 10.0 amd64 Java 17.0.1 JavaFX 17.0.2-ea+3

Checked with the latest development build

  • [X] I made a backup of my libraries before testing the latest development version.
  • [X] I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

When launching Jabref after installing, program freezes. When launching as "Administrator" it at least starts

  1. Open library: selecting my saved library file, ...bib; then I get: "No content in table"

Appendix

Content of Event Log

.Fix SSL exceptions by accepting ALL certificates Not updating theme because it hasn't changed Theme set to Theme{type=DEFAULT, name=''} with base css StyleSheet{jrt:/org.jabref/org/jabref/gui/Base.css} Index path for C:\111_mk\MOK\MOK\matthias.pdf\mkirsch_literature.bib is C:\Users\admin.kirsch.MOK2018\AppData\Local\org.jabref\JabRef\0.5a Opening: 'C:\111_mk\MOK\MOK\matthias.pdf\mkirsch_literature.bib'

mocherry avatar Feb 04 '22 09:02 mocherry

HI, thanks for reporting this. Can you open the bib file with an editor e...g Notepad++ and check the encoding? It might be that some encoding line is missing

Siedlerchr avatar Feb 04 '22 15:02 Siedlerchr

I think something is seriously broken in the file writing algorithm in recent versions. I managed to corrupt my own library by exiting JabRef forcefully during the writing process. Also I have now constantly a sav.tmp file lying around.

Flagging this as devcall, to bring it up for eveyones attention and hopefully it will be fixed soon (maybe even with a hotfix release).

tobiasdiez avatar Feb 07 '22 22:02 tobiasdiez

Improved writing introduced at https://github.com/JabRef/jabref/pull/8238

I will search for the place where an exception is thrown during writing. I will then try to continue writing at this point (and also try to write the exception to a File to allow easier debugging).

We did not change the .sav.tmp logic (yet). Relates to https://github.com/JabRef/jabref/pull/6694.

koppor avatar Feb 18 '22 19:02 koppor

@mocherry Could you send me your original bib file? My email address is available on my GitHub profile.

koppor avatar Feb 19 '22 00:02 koppor

maybe fixed in #8506 ?

calixtus avatar Mar 14 '22 19:03 calixtus