lualatex / luaotfload

OpenType font loader for LuaTeX
Other
26 stars 8 forks source link

Junicode causes luatex to hang #322

Closed eg9 closed 8 years ago

eg9 commented 8 years ago

The following test file causes luatex to hang

\documentclass{article}
\usepackage{fontspec}
\usepackage{lipsum}

\setmainfont{Junicode}

\begin{document}
  \lipsum[1]
\end{document}

This is the output of luatex -v

This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)

and the version of luaotfload

Package: luaotfload 2015/12/09 v2.6 OpenType layout system
Lua module: luaotfload-main 2015/12/09 2.60001 OpenType layout system.
Lua module: lualibs 2015-12-02 2.3 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2015-12-02 2.3 ConTeXt Lua libraries -- extended collection.

The hang up happens after the lines

(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))

Reference: http://tex.stackexchange.com/questions/291020/luatex-does-not-compile-with-junicode

davidcarlisle commented 8 years ago

It works for me with luatex 0.88

with tuenc option or without that option if I alias the old pdfnames so the graphics stuff loads.

phi-gamma commented 8 years ago

···<date: 2016-02-04, Thursday>······

It works for me with luatex 0.88

with tuenc option or without that option if I alias the old pdfnames so the graphics stuff loads.

I’ll look into it but it might take a couple days. Currently I’m cut off from the net on account of an utterly incompetent ISP.

Philipp

phi-gamma commented 8 years ago

···<date: 2016-02-04, Thursday>······

The following test file causes luatex to hang

\documentclass{article}
\usepackage{fontspec}
\usepackage{lipsum}

\setmainfont{Junicode}

\begin{document}
  \lipsum[1]
\end{document}

This hangs here, too. Can’t seem to reproduce it in Plain, though. See the primitive example here:

https://bitbucket.org/phg/lua-la-tex-tests/src/tip/plain/pln-load-font-6-junicode.tex

Is there a more specific way to trigger it that doesn’t involve 3rd party packages?

The hang up happens after the lines

(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/etexcmdssty)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/latexconfig/epstopdf-syscfg))

The log gives more info:

  Package grfext Info: Graphics extension search list:
  (grfext)             [.png,.pdf,.jpg,.mps,.tif,.jpeg,.PNG,.PDF,.JPG,.JPEG,.eps]
  (grfext)             \AppendGraphicsExtensions on input line 452.

  (/home/phg/.local/texlive/2015/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cf
  g
  File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live

  ))
  .................................................
  . fontspec info: "setup-math"
  . 
  . Adjusting the maths setup (use [no-math] to avoid this).
  .................................................
  \symlegacymaths=\mathgroup4
  LaTeX Font Info:    Overwriting symbol font `legacymaths' in version `bold'
  (Font)                  OT1/cmr/m/n --> OT1/cmr/bx/n on input line 7.
  LaTeX Font Info:    Redeclaring math accent \acute on input line 7.
  LaTeX Font Info:    Redeclaring math accent \grave on input line 7.
  LaTeX Font Info:    Redeclaring math accent \ddot on input line 7.
  LaTeX Font Info:    Redeclaring math accent \tilde on input line 7.
  LaTeX Font Info:    Redeclaring math accent \bar on input line 7.
  LaTeX Font Info:    Redeclaring math accent \breve on input line 7.
  LaTeX Font Info:    Redeclaring math accent \check on input line 7.
  LaTeX Font Info:    Redeclaring math accent \hat on input line 7.
  LaTeX Font Info:    Redeclaring math accent \dot on input line 7.
  LaTeX Font Info:    Redeclaring ma

Those aren’t Luaotfload messages, afaics.

eg9 commented 8 years ago

I should have checked better, but something fishy is happening because the problem is arising when \lipsum[1] is being expanded. You can see it if you add

abc\typeout{START}\tracingmacros=1 \par

before \lipsum[1].

u-fischer commented 8 years ago

It fails for me with plain too. But only for some words (one of them is in the lipsum text):

\input{luaotfload.sty}
\font\test="Junicode:mode=node;script=latn;language=DFLT;"
\test
elleatur %hangs

%etteatur %works
\bye

Addition: mode=base doesn't hang.

phi-gamma commented 8 years ago

···<date: 2016-02-09, Tuesday>······

It fails for me with plain too. But only for some words (one of them is in the lipsum text):

\input{luaotfload.sty}
\font\test="Junicode:mode=node;script=latn;language=DFLT;"
\test
elleatur %hangs

%etteatur %works
\bye

Thanks for narrowing that down. Seems like sequences like ellea, ellix, etc. confuse the node builder.

davidcarlisle commented 8 years ago

On 11 February 2016 at 07:15, Philipp Gesang notifications@github.com wrote:

···<date: 2016-02-09, Tuesday>······

It fails for me with plain too. But only for some words (one of them is in the lipsum text):

\input{luaotfload.sty}
\font\test="Junicode:mode=node;script=latn;language=DFLT;"
\test
elleatur %hangs

%etteatur %works
\bye

Thanks for narrowing that down. Seems like sequences like ellea, ellix, etc. confuse the node builder.

seems to be a change related to luatex 0.8x as the file works Ok for me with 0.89

phi-gamma commented 8 years ago

···<date: 2016-02-10, Wednesday>······

On 11 February 2016 at 07:15, Philipp Gesang notifications@github.com wrote:

···<date: 2016-02-09, Tuesday>······

It fails for me with plain too. But only for some words (one of them is in the lipsum text):

\input{luaotfload.sty}
\font\test="Junicode:mode=node;script=latn;language=DFLT;"
\test
elleatur %hangs

%etteatur %works
\bye

Thanks for narrowing that down. Seems like sequences like ellea, ellix, etc. confuse the node builder.

seems to be a change related to luatex 0.8x as the file works Ok for me with 0.89

With a debug build of r5227 I get this:

#0  0x000000000070311b in luaV_execute (L=0x17e5010) at ../../../source/libs/lua52/lua-5.2.4/src/lvm.c:553
#1  0x00000000006ede5b in luaD_call (L=0x17e5010, func=0x2e77520, nResults=1, allowyield=0)
    at ../../../source/libs/lua52/lua-5.2.4/src/ldo.c:402
#2  0x00000000006e5299 in f_call (L=0x17e5010, ud=0x7fffffffd8c0)
    at ../../../source/libs/lua52/lua-5.2.4/src/lapi.c:923
#3  0x00000000006ed01d in luaD_rawrunprotected (L=0x17e5010, f=0x6e5262 <f_call>, ud=0x7fffffffd8c0)
    at ../../../source/libs/lua52/lua-5.2.4/src/ldo.c:131
#4  0x00000000006ee5c2 in luaD_pcall (L=0x17e5010, func=0x6e5262 <f_call>, u=0x7fffffffd8c0, old_top=464, ef=0)
    at ../../../source/libs/lua52/lua-5.2.4/src/ldo.c:603
#5  0x00000000006e5365 in lua_pcallk (L=0x17e5010, nargs=2, nresults=1, errfunc=0, ctx=0, k=0x0)
    at ../../../source/libs/lua52/lua-5.2.4/src/lapi.c:949
#6  0x00000000005937d4 in lua_node_filter (filterid=47, extrainfo=0, head_node=30, tail_node=0x22ba468)
    at ../../../source/texk/web2c/luatexdir/lua/luanode.w:106
#7  0x00000000005afbbf in line_break (d=0, line_break_context=0)
    at ../../../source/texk/web2c/luatexdir/tex/linebreak.w:134
#8  0x00000000004c4fbd in end_graf (line_break_context=0)
    at ../../../source/texk/web2c/luatexdir/tex/maincontrol.w:1514
#9  0x00000000004c116c in run_par_end_hmode () at ../../../source/texk/web2c/luatexdir/tex/maincontrol.w:495
#10 0x00000000004c317a in main_control () at ../../../source/texk/web2c/luatexdir/tex/maincontrol.w:883
#11 0x00000000004bffb8 in main_body () at ../../../source/texk/web2c/luatexdir/tex/mainbody.w:465
#12 0x0000000000488c2f in main (ac=2, av=0x7fffffffdb68) at ../../../source/texk/web2c/luatexdir/luatex.c:517

Looks like it’s stuck inside pre_linebreak_filter.

phi-gamma commented 8 years ago

···<date: 2016-02-11, Thursday>······

···<date: 2016-02-10, Wednesday>······

seems to be a change related to luatex 0.8x as the file works Ok for me with 0.89

Bingo:

# first bad commit: [d1faffcd5d92925a6c5e66ebb72b4c8dcfae236f]
2015-12-17 15:59:00

See the Context mirror: https://bitbucket.org/phg/context-mirror/commits/d1faffcd5d92925a6c5e66ebb72b4c8dcfae236f

phi-gamma commented 8 years ago

A new release is on its way to CTAN, please test.

eg9 commented 8 years ago

I can confirm that, after the update, LuaTeX doesn't hang.

phi-gamma commented 8 years ago

Thanks for the feedback. As it happens, the same issue occurs in Context, despite the new fontloader implementation. Hans is working on fixing the issue upstream.

https://mailman.ntg.nl/pipermail/ntg-context/2016/084435.html