Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tectonic seems to loop infinitely on this input file #470

Closed
pkgw opened this issue Sep 19, 2019 · 4 comments
Closed

Tectonic seems to loop infinitely on this input file #470

pkgw opened this issue Sep 19, 2019 · 4 comments

Comments

@pkgw
Copy link
Collaborator

pkgw commented Sep 19, 2019

I have not yet sat down and tried to create a minimal test case. xelatex processes the file OK.

Also, apparently GitHub filters file extensions, so let's call this a .txt.

timeseries1.tex.txt

@ligfx
Copy link

ligfx commented Oct 8, 2020

I ran into the same issue with a Jupyter notebook exported to Latex, and minimized my file down to this:

\documentclass{article}

\usepackage{fancyvrb}
    
\makeatletter
\let\OriginalVerbatim=\Verbatim
\renewcommand{\Verbatim}[1][1]{
    \def\FV@Space{\discretionary{}{}{something} }
    \OriginalVerbatim[#1]}
\makeatother
    
\begin{document}

\begin{Verbatim}[]
hello world
\end{Verbatim}

\end{document}

Tectonic's output is:

Running TeX ...
(Untitled.tex
LaTeX2e <2018-04-01> patch level 4
Babel <3.20> and hyphenation patterns for 84 language(s) loaded.
(article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(size10.clo)) (fancyvrb.sty
Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix 
<2008/02/07> (tvz) (keyval.sty))
No file Untitled.aux.

and then just hangs.

@ralismark
Copy link
Contributor

ralismark commented Oct 9, 2020

Running gdb (gdb target/debug/tectonic, r -p input.tex, then ctrl-c when it hangs), it appears that the tex engine gets stuck in this loop. Neither of the ifs get run. Here are some relevant values, copied from gdb:

  • main_pp = 525
  • main_ppp = 525
  • is_char_node(main_ppp) = false
  • mem[main_ppp] = {b32 = {s0 = 655360, s1 = -268435455}, b16 = {s0 = 0, s1 = 10, s2 = 1, s3 = 61440}, gr = -3.1050391462465209e+231, ptr = 0xf0000001000a0000}

I'm not familiar enough with the how the tex engine works to figure out what's causing this.

@pkgw
Copy link
Collaborator Author

pkgw commented Oct 9, 2020

Thanks for the investigation @ralismark ! The TeX engine should really not have any bugs of this nature, so this probably indicates a mistake in my translation of the core code. For these kinds of issues I usually end up consulting the book and trying to trace through what's going on to see where I went wrong.

I hope to be able to take a deeper look at this myself, but my main priority is to get a TeXLive 2020 update rolled out.

@pkgw
Copy link
Collaborator Author

pkgw commented Oct 28, 2020

Fixed by #666 it seems!

@pkgw pkgw closed this as completed Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants