View Issue Details

IDProjectCategoryView StatusLast Update
0000787luatexluatex bugpublic2013-05-06 13:21
Reporteritoijala Assigned ToTaco  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSArch Linux 
Product Version0.70.1 
Summary0000787: Trying to create precompiled header crashes Luatex
Description
$ luatex -ini "&lualatex"
This is LuaTeX, Version beta-0.70.2-2012101903 (TeX Live 2012/Arch Linux) (INITEX)
 restricted \write18 enabled.
luatex: ../../../texk/web2c/luatexdir/tex/maincontrol.w:3491: initialize: Assertion `static_pdf==((void *)0)' failed.
Aborted (core dumped)


This makes it impossible to create a precompiled header.
Steps To Reproduce
luatex -ini "&lualatex"
Additional InformationThis is a duplicate of bug 0000746, which unfortunately has the wrong project attribute and it is not possible to change it.
TagsNo tags attached.

Activities

hhenkel

2012-12-04 22:20

manager   ~0000992

For the given case, initialize() is indeed called two times within function main_body(), and therefore there is the assert(). Calls are:

1. through main_initialize()
2. in line 429: if (format_ident != 0) initialize();

The 2nd one gives the assert() as memory is allocated already. initialize() does
so various initializations that maybe it shouldn't be called twice.

It seems to work, if in main_body() one comments the initialize() out.
In which cases is format_ident != 0? Is it _only_ when foirmat_ident contains the string index "(INITEX)" as set up within initialize()? Then it would be safe to comment initialize() out in main_body(), as there is no format to "erase" (false alarm). But it's not clear to me at all.

itoijala

2012-12-05 08:28

reporter   ~0000993

Now I get this error (changed line 429 to "; // initialize();")

$ luatex -ini "&lualatex"
This is LuaTeX, Version beta-0.71.0-2012120508  (INITEX)
 restricted \write18 enabled.

(Fatal format file error; I'm stymied)


texput.log:
This is LuaTeX, Version beta-0.42.0-2012051911 (INITEX)  19 MAY 2012 11:30
 restricted \write18 enabled.
**&latex

! Emergency stop.
<*> &latex
          
End of file on the terminal!

No pages of output.

eroux

2013-04-13 11:03

reporter   ~0001076

Hello,

It seems to be fixes in latest svn:

[eroux ~/lualatex/mylatex/mylatexformat] $ luatex -ini "&lualatex"
This is LuaTeX, Version beta-0.77.0-2013040709 (rev 4629) (INITEX)
luatex: ../../../source/texk/web2c/luatexdir/tex/maincontrol.w:3479: initialize: Assertion `static_pdf==((void *)0)' failed.
Abandon
[eroux ~/lualatex/mylatex/mylatexformat] $ luatex-4630n -ini "&lualatex"
This is LuaTeX, Version beta-0.77.0-2013041310 (rev 4632) (INITEX)
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, nohy
phenation, loaded.

Can you please check?

itoijala

2013-04-13 12:07

reporter   ~0001077

It's not working for me. I tried revisions 4629, 4632 and 4633. All say:

luatex: ../../../source/texk/web2c/luatexdir/tex/maincontrol.w:3479: initialize: Assertion `static_pdf==((void *)0)' failed.

I hope I am testing this correctly:

git svn clone https://foundry.supelec.fr/svn/luatex/trunk luatex
cd luatex
git checkout …
./build.sh
sudo cp build/texk/web2c/luatex /usr/local/bin # this gets rid of a warning that kpathsea cannot find texmf.cnf
/usr/local/bin/luatex -ini '&lualatex'

eroux

2013-04-15 09:31

reporter  

luatex-format.patch (512 bytes)   
Index: mainbody.w
===================================================================
--- mainbody.w	(révision 4633)
+++ mainbody.w	(copie de travail)
@@ -426,7 +426,7 @@
         incr(iloc);
     if ((format_ident == 0) || (buffer[iloc] == '&') || dump_line) {
         char *fname = NULL;
-        if (format_ident != 0)
+        if (format_ident != 0 && !ini_version)
             initialize();       /* erase preloaded format */
         if ((fname = open_fmt_file()) == NULL)
             goto FINAL_END;

luatex-format.patch (512 bytes)   

eroux

2013-04-15 09:31

reporter   ~0001078

Hello, can you test with the attached patch please? It seems to work for me...

itoijala

2013-04-15 09:53

reporter   ~0001080

It no longer crashes!

I get this output:

$ /usr/local/bin/luatex -ini '&lualatex'
This is LuaTeX, Version beta-0.77.0-2013041509 (rev 4633) (INITEX)
 restricted \write18 enabled.

(Fatal format file error; I'm stymied)

Is this expected?

eroux

2013-04-15 10:08

reporter   ~0001081

No... everything works fine with this patch on my system... can someone else test?

itoijala

2013-04-15 12:33

reporter   ~0001082

I put the build with the patch in /usr/bin and it now works.

Perhaps it is not supposed to work when placed in /usr/local/bin (which is in $PATH before /usr/bin).

fmtutil and fmtutil-sys also did not work with /usr/local/bin because it could not find the *.ini files.

I think the bug can be closed when the patch is merged.
Thanks.

eroux

2013-04-15 13:53

reporter   ~0001083

Great!

Issue History

Date Modified Username Field Change
2012-12-04 19:29 itoijala New Issue
2012-12-04 22:20 hhenkel Note Added: 0000992
2012-12-05 08:28 itoijala Note Added: 0000993
2013-04-13 11:03 eroux Note Added: 0001076
2013-04-13 12:07 itoijala Note Added: 0001077
2013-04-15 09:31 eroux File Added: luatex-format.patch
2013-04-15 09:31 eroux Note Added: 0001078
2013-04-15 09:53 itoijala Note Added: 0001080
2013-04-15 10:08 eroux Note Added: 0001081
2013-04-15 12:33 itoijala Note Added: 0001082
2013-04-15 13:53 eroux Note Added: 0001083
2013-05-06 13:21 Taco Status new => closed
2013-05-06 13:21 Taco Assigned To => Taco
2013-05-06 13:21 Taco Resolution open => fixed