Characters of junk seen at toplevel

I see quite some of these warnings when compiling my document. I used biber --tool directly on my bib file and get this:

$ biber --tool references.bib
INFO - This is Biber 2.18 running in TOOL mode
INFO - Logfile is 'references.bib.blg'
INFO - Looking for bibtex file 'references.bib'
INFO - LaTeX decoding ...
INFO - Found BibTeX data source 'references.bib'
INFO - Overriding locale 'en_US' defaults 'variable = shifted' with 'variable = non-ignorable'
INFO - Overriding locale 'en_US' defaults 'normalization = NFD' with 'normalization = prenormalized'
INFO - Sorting list 'tool/global//global/global' of type 'entry' with template 'tool' and locale 'en_US'
INFO - No sort tailoring available for locale 'en_US'
INFO - Writing 'references_bibertool.bib' with encoding 'UTF-8'
INFO - Output to references_bibertool.bib
WARN - Overwriting field 'year' with year value from field 'date' for entry 'Olszta2007'
WARN - Overwriting field 'month' with month value from field 'date' for entry 'Olszta2007'
WARN - Range field 'pages' in entry 'Falvo_D_Urso_Labate_2016' is malformed, falling back to literal
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 13947, warning: possible runaway string started at line 13945
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 21866, warning: 27 characters of junk seen at toplevel
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 27659, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 27677, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 27697, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 27736, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 27938, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 27957, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 27979, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 28004, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: /tmp/biber_tmp_FtYt/33e59b5ca9ec342068223d604c3f8d55_2647.utf8, line 28026, warning: 1 characters of junk seen at toplevel
WARN - BibTeX subsystem: warning: comma(s) at end of name (removing)
INFO - WARNINGS: 15

I also looked directly at the temporary file but cannot see anything fishy at the mentioned lines…
The internet is full of such questions but not much solutions are available other than looking for non-ascii chars. I also do not understand the runaway warning, because I can not see an single unescaped % in the file…
However, as the file is generated by JabRef, maybe someone here has some insights?
(Even though these are just warnings, and everything compiles perfectly, I want to know what the problem is, because these things (weird characters etc) have to be proven nasty in the past to get to real issues real quick…)

Without more info, debugging this is hard. The most obvious thing i see is

WARN - Range field 'pages' in entry 'Falvo_D_Urso_Labate_2016' is malformed, falling back to literal

because that warning came right before the “tmp” warnings are triggered, so check out that entry.

yes sure, but what could I check further? There must be reasons for these warnings and the only ones I know are % somewhere in the text causes runaway argument and characters between entries cause junk characters. Both seems not to be the case.

the pages there say 0--0, obviously an issue, but I would argue that can possibly not cause runaway arguments and junk characters…

easy to find out. Just remove that line with 0--0 and try to compile again. :slight_smile:

Other special characters apart from %

The following ten characters have special meanings in (La)TeX:

& % $ # _ { } ~ ^ \

Outside \verb, the first seven of them can be typeset by prepending a backslash; for the other three, use the macros \textasciitilde, \textasciicircum, and \textbackslash.

Maybe you could post what is written in line 13945.

Well okay, found one issue: the line 21866, warning: 27 characters of junk seen at toplevel
was caused by

Scopus
EXPORT DATE: 15 July 2021

in the bib file… looks like I exported a list of references from scopus and added them to jabref back then - and this was put into the library as well…

I fixed the 3 warnings, regarding the page numbers and dates, but that would not resolve the others.

line 13946, warning: possible runaway string started at line 13944:
With the linenumbers in front:

13938   groups = {FREEDOM},
13939   modificationdate = {2022-12-08T11:02:29},
13940   publisher = {Elsevier BV},
13941
13942 }
13943
13944 @article{Freemantle2012,
13945   author = {N. Freemantle and C. Cooper and A. Diez-Perez and M. Gitlin and H. Radcliffe and S. Shepherd and C. Roux},
13946   journal = {Osteoporosis International},
13947   title = {Results of indirect and mixed treatment comparison of fracture efficacy for osteoporosis treatments: a meta-analysis},
13948   year = {2012},

Thanks for the list of characters, I’ll investigate further!

1 Like
13944 @article{Freemantle2012,
13945   author = {N. Freemantle and C. Cooper and A. Diez-Perez and M. Gitlin and H. Radcliffe and S. Shepherd and C. Roux},
13946   journal = {Osteoporosis International},
13947   title = {Results of indirect and mixed treatment comparison of fracture efficacy for osteoporosis treatments: a meta-analysis},
13948   year = {2012},

is this entry enclosed with a } at the end?

yes - sorry, that was just the surroundings of the line.

could you post the full entry? What you posted so far looks pretty normal to me.

Another method to debug this would be to use the 50/50 rule of debugging:

  1. Delete 50% of your entries, check if warnings emerge.
  2. If yes, delete another 50% of your entries and check if warnings emerge
  3. If yes, delete another 50% of your entries and check if warnings emerge
  4. … repeat
  5. until no warnings emerge anymore. Then go one step back and try to delete 50% of your entries FROM THAT PART of entries and check if errors emerge
  6. repeat

With this approach you will very soon find the location that triggers the error.

In you your case, you already might have found the entries in question, so you can try to delete the entry with citationkey Freemantle2012 from your list of references (of course, before that, make a backup) and check if the warnings and errors are still triggered.

1 Like

oookay… I found the runaway argument and it actually looks like a bug (is it?!) in biber?

Here is a minimal working bugging example:

@Article{Foo2018,
  author           = {Foo, Baz},
  title            = {I will trigger a warning},
  year             = {2018},
  month            = feb,
  comment          = {hello
Bugme = fazbaz},
}
WARN - BibTeX subsystem: /tmp/biber_tmp_fndt/b6a332ccbf47b8fa14531c0a7906122e_3466.utf8, line 7, warning: possible runaway string started at line 6

The issue is that the comment is in the second line of type text = text… It looks like the biber parser assumes that some brace wasnt correctly closed and Bugme is a key.
Indeed, this raises no warning:

@Article{Foo2018,
  author           = {Foo, Baz},
  title            = {I will trigger a warning},
  year             = {2018},
  month            = feb,
  comment          = {hello
Bugme not = fazbaz},
}

But the question is then: Is this an issue caused by Jabref or is this really an incorrect warning in biber?

And now I also see why I hav’nt found it before. The line numbers that biber shows are from the original file, and not from the temporary one - even though the temp name is written before that oO.
And with that, I also see the other warnings directly… there are ' before each entry like this:

'
@Article{Bazfaz,
[...]

I think these also came from another bib file… But why is such stuff not removed when I import them into a library with jabref?