-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
NegativeArraySizeException on saving #8265
Comments
Uff, this sounds bad, but as a fellow user (not programmer) of Jabref who is trying to help in debugging this, i do have some follow up questions, to make everything a little bit more clear:
In general, next time you encounter this or any problems, a full copy of the debuglog would be more adviced than a screenshot. you can capture it on windows machines by clicking into the error message, then press ctrl+A (which selects all text) and then press ctrl+c (copy) and then you can paste it on github or wherever you see fit. |
Thank you @ThiloteE for your quick response. Concerning your remarks on the contradictions above: when I inquired about certain steps prior to closing Jabref I only got the clarification, that there were no new entries or subcategories added, but corrections as mentioned above. When I open the program on my computer and with the backup from a couple of weeks ago, nothing happens out of the ordinary. Also exporting the files works perfectly fine. Which hasn't been the case on the other device. Makes no sense to me. That is the Jabref version we've updated to on friday "When you open your library-file with a text editor (e.g. right-click>open with>editor) can you still see the entries that have vanished from Jabref? Are the entries gone from the file completely or are they just not depicted within Jabref? If they are only gone in Jabref, but still exist in the library file, what is the difference between old file and new file?"
Until recently we didn't have any major complications. So it's quite a setback, if we/my colleague have/has to fear of actually losing work of almost a year. Since it is not published yet it's kind of sensitive data :/ |
Thanks for the immediate response as well.
What you report is very serious, but i am very pessimistic this can be solved without knowing what exactly changed in the files and/or any steps that allow us to reproduce this issue. I fear there is just not enough data to investigate this, but If you updated from a very old version of Jabref to the newer 5.3 version, maybe what was encountered is a known problem. For that we would need to know the exact version of your old Jabref. The only other thing i can think of is for the experts to stare at the jabref code real long and hard and start to think how such an error could come into being, but that is like trying find a needle in a haystack.... |
Thank you very much for your report. The exception looks similar to #8231 A quick look in the code seems to show that it has to do with writing the formatted field names. jabref/src/main/java/org/jabref/logic/bibtex/BibEntryWriter.java Lines 191 to 193 in 5680d15
Do you use any Custom entry types or entry types with (non standard) fields? PS: You can send bib files with sensitive data to vorstand[at]jabref.org or developers[at]jabref.org. They will be handled securely by the dev team only. |
Thank you for pointing that out. Well, I'm currently not aware of such a customization. Therefore I only can assume that it has to do with the field length or indentation respectively. We obviously must have overlooked something. |
And to answer your question @ThiloteE |
I should finish JabRef/blog.jabref.org#47 ^^ |
@KLemke-85 Could you please try the binary at @AlbertJBurton Could you please try the binary at https://builds.jabref.org/pull/8270/merge/? In case you see some wrong indent at some bib entry, it would be nice if you could that bibentry here for further investigation. |
I'm very sorry, but I have no idea, what I'm supposed to do with that, literally. And I was trying to send our bib-file to your developer address, but the mail is bouncing back. |
@KLemke-85 There was a typo: try [email protected] (there was an "s" missing) |
okeee... now I can see the s... Thx! |
Thanks for the file. If you open the file with a text editor ( Editor on Windows or any other plain text editor) and scroll down to the end, after the comment section, there are some errors. Delete that "Schlemmer1927" and the line below. And also delete the character "q" from the line: However, I noticed some weird things regarding the authors. Some authors have square Brackets in the name... |
Ok. I will look into that :) thank you very much!!! |
I deleted the Schlemmer-Error (finally), but didn't have a "q" in the mentioned line. Shouldn't be a bother. I guess. |
Yes, that is correct. I already have dealt with that, thx to @Siedlerchr and managed to delete that warning/entry. We had this warning for a while, in the beginning with a different entry. But I didn't know how to treat it at the time. But there never was a problem with saving and such. Therefore we ignored it... we probably shouldn't have. And from the little experience I have, while using the portable version an error like the one I opened the issue for didn't come up (yet). |
Unfortunately there was a new warning, but now I can provide the complete bug report, which you may find below. Just from this morning. I also attached to screenshots, one shows a new warning. java.lang.NegativeArraySizeException: -2 |
I think 'Error in line 7007' means that the problem is in row 7007 of your library-file. No? |
Yes, that is the line where it failed, the root cause of the error could be in lines earlier. It has something to do with the braces. This is often the case where a closing curly brace "}" is missing and so JabRef thinks the entry's field continues in the following lines |
I just checked the number of braces, all accounted for it seems :) but I've noticed, that the output of entries with the additional information of the month of publication are not representated with a curly brace, if I open the data via text editor. And I found a couple of square brackets that are not individually cupped by curly braces. And, even though I've applied what you've sugggested yesterday @Siedlerchr the warning "schlemmer1927" turned up again today. |
@KLemke-85 Okay. Try. Close JabRef. copy the bib file (as backup). Then delete the *.bak and *.sav files and try again. |
JabRef version
5.3 (latest release)
Operating system
Windows
Details on version and operating system
No response
Checked with the latest development build
Steps to reproduce the behaviour
Appendix
...
Log File
![JabRef 2021_11_19](https://user-images.githubusercontent.com/72263522/142839360-885288ee-3242-4212-b91c-3b5396230fe5.JPG)
The text was updated successfully, but these errors were encountered: