Enrico Forestieri <[EMAIL PROTECTED]> writes:

> I made a self-contained executable from lyxsum.C and tried it on every
> file in the texmf tree but did not succeed in crashing it. So I added
> some debugging statements to src/support/lyxsum.C to see what file was
> triggering the crash and to my suprise it was not a file but a directory...
> 
> $ src/lyx-qt.exe
> New counter already exists: section
> Locale en_US could not be set
>  beamericonbook.pdf
>  beamericonbook.20.pdf
>  beamericonarticle.pdf
>  beamericonarticle.20.pdf
> Computing crc of "/tmp/lyx_tmpdir1456cHRIK5/lyx_tmpbuf0/beamer-crash.tex"
> Computing crc of "/c/texmf/tex/latex/beamer/beamer.cls"
> Computing crc of "/c/texmf/tex/latex/beamer/beamerbasemodes.sty"
> Computing crc of "/c/texmf/tex/latex/beamer/beamerbasedecode.sty"
> Computing crc of "/c/texmf/tex/latex/beamer/beamerbaseoptions.sty"
> Computing crc of "/c/texmf/tex/latex/graphics/keyval.sty"
> Computing crc of "/c/texmf/tex/latex/pgf/basiclayer/pgfcore.sty"
> Computing crc of "/c/texmf/tex/latex/graphics/"
> Abort (core dumped)
> 
> I tried the same with a mingw build and got that it also tried computing
> the crc of the same directory, but in this case no crash was occurring.
> 
> As it seems really strange that the crc of a directory is needed I tought
> that it is better if I still stick with this mailing list before going
> to bug the cygwin people 


I think I found the source of the problem. LyX reads the log file
generated by running latex to build a list of files used as dependency.

The files are extracted from the log by using a bunch of regular
expressions. These regexps sometime fail to correctly extract a file
name if it is truncated between lines.

For example, the following is an excerpt from the log file
/tmp/lyx_tmpdir1456cHRIK5/lyx_tmpbuf0/beamer-crash.log generated by
MikTeX and leading to the last files above, just before the crash:

...
(C:\texmf\tex\latex\beamer\beamerbaseoptions.sty
Package: beamerbaseoptions 2004/11/15 (rcs-revision 1.7)
(C:\texmf\tex\latex\graphics\keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
[EMAIL PROTECTED]@=\toks14
)) (C:\texmf\tex\latex\pgf\basiclayer\pgfcore.sty (C:\texmf\tex\latex\graphics\
graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
...

Notice that the line ending in "(C:\texmf\tex\latex\graphics\" really
ends with a linebreak, such that graphicx.sty is not wrapped but it is
on the next line (I checked it editing with vim the file).

So, instead of "C:\texmf\tex\latex\graphics\graphicx.sty" the regexps
extract simply "C:\texmf\tex\latex\graphics\", upon which the crc
computation is tried, leading to a crash in cygwin.

I'll try to come up with a patch to the LaTeX::deplog() function in
src/LaTeX.C.

-- 
Enrico



Reply via email to