This is the result of interaction between two configuration options that TeX has (among many others):
error_line, the "width of context lines on terminal error messages", i.e. the maximum number of characters in an error message "line".
max_print_line, the "width of longest text lines output", i.e. the length at which line-wrapping (by inserting hard newlines) happens.
Normally, TeX prints an error message in two "lines":
The first line contains up to half_error_line characters, say k characters happen to be printed.
The second "line" then contains k spaces, followed by up to error_line - k characters, so that its total length is bounded by error_line.
Now, a weird thing happens when error_line ≥ max_print_line: while the (up to) error_line characters are being printed (on the second line), we can hit max_print_line, and then TeX will wrap the line by inserting a newline character!
This can be somewhat confusing (see the example error output below), so IMO it's best to set error_line < max_print_line.
The original tex.web, as written, sets error_line = 72 and max_print_line = 79, and leaves it up to the local installation to change those values. Any TeX implementation that uses these exact values will not have this problem.
In TeX Live, where these can be configured at runtime (in texmf.cnf or via environment variables), these values are both set to 79 in the default texmf.cnf, leading to a blank line when exactly 79 characters happen to be printed in the second error "line". It would be worse if max_print_line were to be set less than error_line, as we can then get ugly output like (your file with max_print_line=73 error_line=79 tex):
! Undefined control sequence.
<inserted text> ... =1 \hfil Title\hfil \elsePage
\dotfill \the \pageno \
hfi...
\makeheadline ...{\vbox to8.5\p@ {}\the \headline
}\vss }\nointerlineskip
\plainoutput ->\shipout \vbox {\makeheadline
\pagebody \makefootline }\ad
van...
-- here in the first pair of error lines (spread over three physical lines) \hfil has been split, in the second pair of error lines there's a confusing blank line, and in the third pair \ad on one line and van... on the next looks mysterious.
IMO in an ideal world:
TeX would check that error_line < max_print_line, or at least document it as an expectation. I have no idea why this is not enforced.
TeX Live would change its defaults to something like 78 and 79, instead of 79 for both.
Personally, one of the first things I do with a TeX installation is to set
half_error_line=238
error_line=254
max_print_line=1000000
in my texmf.cnf, so that there's no line wrapping and error lines are as long as possible.
Edit: By setting max_print_line much smaller than error_line, we can even have (what are supposed to be) pairs of error lines occupying nine physical lines:
% Quotes from DEK
\def\email{Email is a wonderful thing for people whose role in life is to be on top of things. But not for me; my role is to be on the bottom of things. What I do takes long hours of studying and uninterruptible concentration. I try to learn\theory certain areas of computer science exhaustively; then I try to digest that knowledge into a form that is accessible to people who don't have time for such study.}
\def\theory{If you find that you're spending almost all your time on theory, start turning some attention to practical things; it will improve your theories. If you find that you're spending almost all your time on practice, start turning\lp some attention to theoretical things; it will improve your practice.}
\def\lp{Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a comput\err to do. The practitioner....}
\email
\bye
Run with
max_print_line=60 half_error_line=238 error_line=254 tex err.tex
to get:
This is TeX, Version 3.14159265 (TeX Live 2019/Debian) (preloaded format=tex)
(./err.tex
! Undefined control sequence.
\lp ->Let us change our traditional attitude to the construc
tion of programs: Instead of imagining that our main task is
to instruct a computer what to do, let us concentrate rathe
r on explaining to human beings what we want a comput\err
to
do. The pr...
\theory ...you find that you're spending almost all your tim
e on theory, start turning some attention to practical thing
s; it will improve your theories. If you find that you're sp
ending almost all your time on practice, start turning\lp
so
me attentio...
\email ... wonderful thing for people whose role in life is
to be on top of things. But not for me; my role is to be on
the bottom of things. What I do takes long hours of studying
and uninterruptible concentration. I try to learn\theory
ce
rtain areas...
l.5 \email
? x
No pages of output.
texmf.cnfin TL tweaked slightly IMO (ensureerror_line < max_print_line). – ShreevatsaR Jan 28 '20 at 08:23kpsewhichprocess and read its output :-) – ShreevatsaR Jan 29 '20 at 02:41\showoutputwould be more serious. – ShreevatsaR Jan 29 '20 at 05:20