On Tue, Feb 18, 2020 at 12:54 PM Marcel Fabian Krüger <tex@2krueger.de> wrote:
On Tue, Feb 18, 2020 at 01:55:59AM -0500, Daniel Benjamin Miller wrote:
> There is an issue with lualatex which comes about when using a document such
> as this (based on a discussion here https://tex.stackexchange.com/questions/525898/combining-french-and-greek-babel-does-not-work-in-dvilualatex/526020?noredirect=1#comment1331448_526020).
>
> Try running lualatex on the following document, and an error will be
> returned. This seems to apply for all fonts whose packages were generated by
> autoinst (step is just an example).
>
> \documentclass[12pt]{article}
>
> \usepackage[utf8]{luainputenc}\usepackage[LGR,T1]{fontenc}\input{lgrenc.dfu}
>
> \usepackage{step} \usepackage[greek.ancient,main=french]{babel}
>
> \title{Ça marche?} %\date{} \author{me}
>
> \begin{document} \maketitle un, deux, trois \foreignlanguage{greek}{ἀγαγεῖν}
> \end{document}
>
> According to Marcel Krüger, this is related to an issue which was reported
> over a year ago:
> https://mailman.ntg.nl/pipermail/dev-luatex/2018-November/006138.html.
>

A plain LuaTeX example for this would be

\directlua{
  callback.register('kerning', node.kerning)

  font.current(font.define {
    name = "dummy",
    type = "virtual",
    characters = {
      {
        width = 655360,
        height = 655360,
        depth = 655360,
        commands = {},
      },
      right_boundary = {
        width = 655360,
        height = 655360,
        depth = 655360,
      },
    },
  })
}
\char1
\bye

The issue appears for fonts with a right boundary char if they appear at
the end of a paragraph and the kerning callback is overwritten. Then the
right boundary is passed as tail  to the callback which will then remove
the boundary from the node list. As discussed in the earlier thread,
the callback currently can't pass the new tail to LuaTeX (and LuaTeX
does not recalculate the tail in contrast to the documentation) so
LuaTeX adds the end of paragraph glue etc. after the no longer existing
old tail, leading to the error because the new list does not end with
these required nodes.

ok, thank you. I will see it together with the old thread. 

--
luigi