View Issue Details

IDProjectCategoryView StatusLast Update
0000912luatexluatex bugpublic2015-03-21 14:57
ReporterTaco Assigned ToTaco  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0000912: Serious bug in LuaTeX linebreaking
DescriptionFrom Yannis:

dear Taco, Peter and Daniel,
please read the included PDF file, it is about a bug I discovered in LuaTeX which is blocking a project of mine.
Thanks in advance for your help
Yannis
TagsNo tags attached.

Activities

Taco

2014-07-31 09:34

administrator  

files.zip (230,056 bytes)

Taco

2014-07-31 09:34

administrator  

minimal-sample.pdf (71,645 bytes)

Taco

2014-09-19 11:59

administrator   ~0001280

Problem is triggered by the \language forcing luatex to apply English hyphenation patterns to the text before they reach the tfm replacement engine.

luigi scarso

2014-10-29 09:49

developer   ~0001297

Last edited: 2014-10-29 09:50

We (luigi and hans) investigated the problem and came to the conlusion that the best aproach is to set the language to -1 for such ascii-input approaches. After all, one cannot say how normal english (or any other latin) languages comes out due to lig building in this font. Proper language tagging is a quite robust solution

%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pdfoutput1
\pdfmapfile{yh.map}
\font\xx=yarabic scaled2400
\documentclass{article}
\title{A Bug in Lua\LaTeX}
\author{Yannis Haralambous\\yannis.haralambous@telecom-bretagne.eu}
\begin{document}
\maketitle
When preparing an Arabic font using a large number of smart ligatures in OVF format, I encountered the following serious bug: starting with the fourth character, white space equal to the width of the word is inserted to the left of the word, and starting with the sixth character, part of the word is duplicated:

{

\baselineskip36pt
\xx\language-1 \luatextextdir TRT
Yu

YuDo

YuDoli

YuDolilo

YuDolilohu

YuDolilohuka

YuDolilohukaki

YuDolilohukakiko

Yu YuDo YuDoli YuDolilo YuDolilohu YuDolilohuka YuDolilohukaki

}
 

Furthermore, when adding an additional line where all of these words appear on the same line, Lua\LaTeX\ crashes with the following error message:
\begin{verbatim}
Assertion failed: (type(vlink(cur_p))==disc_node&&
subtype(vlink(cur_p))==select_disc),
function ext_do_line_break,
file ../../../texk/web2c/luatexdir/tex/linebreak.w, line 1965.
)Abort trap: 6
\end{verbatim}

To run this sample you need the following files: yarabic.ovf, yarabic.ofm, yarabicr.tfm, Yarabic.pfa, yh.map which I am including in a ZIP file files.zip.

The ligatures used to obtain the longest version of the word are the following:

\begin{quote}\small
Yu:\\
59 + 75 LIG 359 (isolated ya with damma)\\
YuD:\\
359 + 44 LIG/ 30A (in front of dad, ya+damma becomes initial)\\
YuD:\\
30A + 44 /LIG 06 (after initial ya+damma, the dad becomes final)\\
YuDo:\\
06 + 6F LIG E06 (final dad with sukun)\\
YuDol:\\
E06 + 6C LIG/ E05 (in front of lam, dad+sukun becomes medial)\\
YuDol:\\
E05 + 6C /LIG B0 (after medial dad+sukun, the lam becomes final)\\
YuDoli:\\
B0 + 69 LIG 2B0 (final lam with kasra)\\
YuDolil:\\
2B0 + 6C LIG/ 2AF (in front of lam, lam+kasra becomes medial)\\
YuDolil:\\
2AF + 6C /LIG B0 (after medial lam+kasra, the lam becomes final)\\
YuDolilo:\\
B0 + 6F LIG EB0 (final lam with sukun)\\
YuDoliloh:\\
EB0 + 68 LIG/ EAF (in front of ha, lam+sukun becomes medial)\\
YuDoliloh:\\
EAF + 68 /LIG A7 (after medial lam+sukun, the ha becomes final)\\
YuDolilohu:\\
A7 + 75 LIG 3A7 (final ha with damma)\\
YuDolilohuk:\\
3A7 + 6B LIG/ 3A6 (in front of kaf, ha+damma becomes medial)\\
YuDolilohuk:\\
3A6 + 6B /LIG AD (after medial ha+damma, the kaf becomes final)\\
YuDolilohuka:\\
AD + 61 LIG 1AD (final kaf with fatha)\\
YuDolilohukak:\\
1AD + 6B LIG/ 1AC (in front of kaf, kaf+fatha becomes medial)\\
YuDolilohukak:\\
1AC + 6B /LIG AD (after medial kaf+fatha, the kaf becomes final)\\
YuDolilohukaki:\\
AD + 69 LIG 2AD (final kaf with kasra)\\
YuDolilohukakik:\\
2AD + 6B LIG/ 2AC (in front of kaf, kaf+kasra becomes medial)\\
YuDolilohukakik:\\
2AC + 6B /LIG AD (after medial kaf+kasra, the kaf becomes final)\\
YuDolilohukakiko:\\
AD + 6F LIG EAD (final kaf with sukun)
\end{quote}

To obtain the crash and error message, uncomment the last line (Yu YuDo YuDoli YuDolilo YuDolilohu YuDolilohuka YuDolilohukaki) and run the file again.

Thanks in advance for investigating and solving this problem, my project depends on it.

\end{document}

Hans Hagen

2015-03-21 14:57

manager   ~0001344

setting language is the option: we have a split hyohenation / lig building stage

Issue History

Date Modified Username Field Change
2014-07-31 09:34 Taco New Issue
2014-07-31 09:34 Taco File Added: files.zip
2014-07-31 09:34 Taco File Added: minimal-sample.pdf
2014-09-18 16:10 Taco Assigned To => Taco
2014-09-18 16:10 Taco Status new => acknowledged
2014-09-19 11:59 Taco Note Added: 0001280
2014-10-29 09:49 luigi scarso Note Added: 0001297
2014-10-29 09:50 luigi scarso Note Edited: 0001297
2015-03-21 14:57 Hans Hagen Note Added: 0001344
2015-03-21 14:57 Hans Hagen Status acknowledged => closed
2015-03-21 14:57 Hans Hagen Resolution open => fixed