Can't save after making some changes

(Gregório Miranda) #1

Hi all,

For some reason, I can’t save a database after making some specific changes. I can reproduce the error by changing a field in an specific entry copied from another database and by adding a masters thesis entry, but it feels pretty much random. It’s a known bug? I couldn’t find it.

I’m running Jabref 3.8.2 in Debian Jessie and my java version is:

java version "1.8.0_144"
Java™ SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot™ 64-Bit Server VM (build 25.144-b01, mixed mode)

The error console gives the following:

21:12:18.387 [AWT-EventQueue-0] ERROR net.sf.jabref.gui.BasePanel - runCommand error: Braces don’t match.
java.lang.IllegalArgumentException: Braces don’t match.
at net.sf.jabref.logic.bibtex.LatexFieldFormatter.checkBraces( ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.bibtex.LatexFieldFormatter.formatAndResolveStrings( ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.bibtex.LatexFieldFormatter.format( ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.bibtex.BibEntryWriter.writeField( ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.bibtex.BibEntryWriter.writeRequiredFieldsFirstRemainingFieldsSecond( ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.bibtex.BibEntryWriter.write( ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.exporter.BibtexDatabaseWriter.writeEntry( ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.exporter.BibDatabaseWriter.savePartOfDatabase( ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.logic.exporter.BibDatabaseWriter.saveDatabase( ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.gui.exporter.SaveDatabaseAction.saveDatabase( ~[JabRef-3.8.2.jar:?]
at ~[JabRef-3.8.2.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke( ~[?:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:1.8.0_144]
at java.lang.reflect.Method.invoke( ~[?:1.8.0_144]
at spin.Invocation.evaluate( ~[JabRef-3.8.2.jar:?]
at$ ~[JabRef-3.8.2.jar:?]
at ~[?:1.8.0_144]

(Christoph) #2

Hi, the error indicates that the number of open and closed braces does not match. You should check your bibtec code for the entry
In the actual 4.0 dev version this error has been fixed in the way that missing braces are inserted on saving

(Gregório Miranda) #3

Indeed, the reference code needed a last brace to work properly. But somehow, the next time I opened jabref I couldn’t reproduce the error anymore. Good to know if it happens again, though. Thanks for your reply.