[luatex] Odd behavior of luatex + fontspec + luaotfload
Nicolas Holzschuch
Nicolas.Holzschuch at inria.fr
Tue Jun 5 21:06:24 CEST 2012
On Jun 5, 2012, at 10:06, Taco Hoekwater <taco at elvenkind.com> wrote:
> 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.
Indeed, the call stack is limited to 1020, which is a bit small.
> write_cid_fontdictionary and write_cid_tounicode have the same
> function prototype with the same argument list, and the start of
> write_cid_fontdictionary is:
>
> void write_cid_fontdictionary(PDF pdf, fo_entry * fo, internal_font_number f)
> {
> int i;
> 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)
> {
>
> int range_size[65537];
> glyph_unicode_entry gtab[65537];
>
> 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).
Has anybody ever told you that you're a genius?
Yes, simply changing these two variables into malloc-ed memory solved my problem. I am now able to run lualatex on my iPad. Thank you very, very much.
As you said, there are other memory issues (with only 256 Mb available, and the system and other apps taking already half of that, I am used to memory issues). But the memory limit now happens at page 28, which is much better.
--
Best regards,
Nicolas Holzschuch
>
> Best wishes,
>
> Taco
More information about the luatex
mailing list