[luatex] Odd behavior of luatex + fontspec + luaotfload
taco at elvenkind.com
Tue Jun 5 10:06:00 CEST 2012
On 06/04/2012 06:26 PM, Nicolas Holzschuch wrote:
> #0 write_cid_tounicode (pdf=0x2fdff4fc, fo=0x40427a0, f=Cannot access memory at address 0x2fcff478
> ) at ../../../source/texk/web2c/luatexdir/font/tounicode.w:479
> #1 0x0006d4b8 in write_cid_fontdictionary (pdf=0x1afbc00, fo=0x40427a0, f=21) at ../../../source/texk/web2c/luatexdir/font/writefont.w:990
Either went wrong during your compilation, or the call stack on
the iPad is too small.
write_cid_fontdictionary and write_cid_tounicode have the same
function prototype with the same argument list, and the start of
void write_cid_fontdictionary(PDF pdf, fo_entry * fo,
fo->tounicode_objnum = write_cid_tounicode(pdf, fo, f);
So, unless something was seriously messed up, both argument lists in
the backtrace should look the exactly the same. Instead, both 'pdf'
and 'f' have changed on the call stack, and usually that happens
because the call stack has overrun. Possibly because of this:
int write_cid_tounicode(PDF pdf, fo_entry * fo, internal_font_number f)
Changing those static local definitions into malloc-ed memory
will probably fix the bug (at least, this bug. You may well run
into a similar or different memory-related problem elsewhere).
More information about the luatex