Scott Kostyshak
2014-09-12 12:53:19 UTC
If you have an updated TeX Live 2014 installation, exporting
examples/FeynmanDiagrams.lyx to PDF with LuaTeX will not work. But LyX
doesn't detect that something goes wrong. You need LuaTeX version
beta-0.79.1 to reproduce the following. The LuaTeX bug will not
trigger the LyX bug with LuaTeX version beta-0.76.0-2013061708, for
example. Also, I have no idea if this depends on the version of Qt. I
have confirmed that Kornel also sees the zero exit code but no
exported file, but we have similar systems.
In the GUI, LyX says that the preview was successful and tries to open
the PDF. On the command line, LyX gives a zero exit code:
If you run lualatex directly, you get a non-zero exit code:
lualatex: ../../../tex-live-2014-04-01/texk/web2c/luatexdir/tex/mlist.w:2542:
make_ord: Assertion `varmem[(p)].hh.v.RH!=0' failed.
Aborted (core dumped)
$ echo $?
134
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014) (rev 4971)
restricted \write18 enabled.
(./FeynmanDiagrams.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 79 languages loaded.
If you run with LyX (I added some debug code for extra information):
$ lyx -e pdf5 FeynmanDiagrams.lyx
lualatex: ../../../tex-live-2014-04-01/texk/web2c/luatexdir/tex/mlist.w:2542:
make_ord: Assertion `varmem[(p)].hh.v.RH!=0' failed.
support/Systemcall.cpp (294): Systemcall: 'lualatex
"FeynmanDiagrams.tex"' exit code is: 0
d.errorMessage() is: The process crashed some time after starting successfully.
d.exitStatusMessage() is: The process crashed.
$ echo $?
0
The strange thing going on here is that SystemcallPrivate::exitCode is
returning 0 because QProcess::exitCode returns 0. I'm not sure why
this happens. The documentation states that QProcess::exitCode
"Returns the exit code of the last process that finished." Is the
point that because lualatex crashed the process didn't "finish"? I
don't think so, because when I use the following patch:
@@ -610,7 +619,7 @@ int SystemcallPrivate::exitCode()
if (!process_)
return -1;
- return process_->exitCode();
+ return process_->exitStatus();
}
SystemcallPrivate::exitCode correctly returns non-zero (it returns 1)
and it is also described as "Returns the exit status of the last
process that finished." After replacing exitCode with exitStatus and
applying the patch I just sent, LyX behaves as expected. But that is
not quite correct because I think we want to return the exit code and
not just the exit status.
Any ideas?
Scott
examples/FeynmanDiagrams.lyx to PDF with LuaTeX will not work. But LyX
doesn't detect that something goes wrong. You need LuaTeX version
beta-0.79.1 to reproduce the following. The LuaTeX bug will not
trigger the LyX bug with LuaTeX version beta-0.76.0-2013061708, for
example. Also, I have no idea if this depends on the version of Qt. I
have confirmed that Kornel also sees the zero exit code but no
exported file, but we have similar systems.
In the GUI, LyX says that the preview was successful and tries to open
the PDF. On the command line, LyX gives a zero exit code:
If you run lualatex directly, you get a non-zero exit code:
lualatex: ../../../tex-live-2014-04-01/texk/web2c/luatexdir/tex/mlist.w:2542:
make_ord: Assertion `varmem[(p)].hh.v.RH!=0' failed.
Aborted (core dumped)
$ echo $?
134
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014) (rev 4971)
restricted \write18 enabled.
(./FeynmanDiagrams.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 79 languages loaded.
If you run with LyX (I added some debug code for extra information):
$ lyx -e pdf5 FeynmanDiagrams.lyx
lualatex: ../../../tex-live-2014-04-01/texk/web2c/luatexdir/tex/mlist.w:2542:
make_ord: Assertion `varmem[(p)].hh.v.RH!=0' failed.
support/Systemcall.cpp (294): Systemcall: 'lualatex
"FeynmanDiagrams.tex"' exit code is: 0
d.errorMessage() is: The process crashed some time after starting successfully.
d.exitStatusMessage() is: The process crashed.
$ echo $?
0
The strange thing going on here is that SystemcallPrivate::exitCode is
returning 0 because QProcess::exitCode returns 0. I'm not sure why
this happens. The documentation states that QProcess::exitCode
"Returns the exit code of the last process that finished." Is the
point that because lualatex crashed the process didn't "finish"? I
don't think so, because when I use the following patch:
@@ -610,7 +619,7 @@ int SystemcallPrivate::exitCode()
if (!process_)
return -1;
- return process_->exitCode();
+ return process_->exitStatus();
}
SystemcallPrivate::exitCode correctly returns non-zero (it returns 1)
and it is also described as "Returns the exit status of the last
process that finished." After replacing exitCode with exitStatus and
applying the patch I just sent, LyX behaves as expected. But that is
not quite correct because I think we want to return the exit code and
not just the exit status.
Any ideas?
Scott