# Debug infinite loop in text file and other stuff [closed]

I have some old code that I am trying to revive. I worked fine before but now it does not, but the code has not changed(so it is due to the changed configuration of the software). There is no real error messages that make sense.

The problem is that there seems to be a package or packages that are interfering because when I remove them the tex code compiles but, of course, lots of errors.

I have gotten some of the code to work by removing the code that depended on the packages. (if the only line is the usepackage statement, it still crashes, meaning it is the package)

The packages are

xparse atbegshi xfrac mdframed(a lot of my code depends on this)

Package: xpatch 2012/10/02 v0.3 Extending etoolbox patching commands
.................................................
)
Runaway argument?
\q_stop \exp_args:NNo \group_end: \iow_log:n \l__iow_wrap_tl \iow_log:n \ETC.
! File ended while scanning use of \__iow_wrap_loop:w.


After removing some stuff the infinite loop goes away(I think it is mainly mdframed and xparse).

It seems to be some issue with some stale packages, any ideas where to look or what I can do to try and figure it out?

%\tracingall
\documentclass[12pt,oneside]{book}\batchmode

\usepackage[T1]{fontenc}
\usepackage{silence}
\usepackage[x11names]{xcolor}
\usepackage[margin=1in,a4paper]{geometry} % a5paper for electronic reading
\usepackage{luatex, graphicx}
\usepackage[space]{grffile}
\usepackage{tikz, pgffor}
\usepackage{pdfcolmk}
\usepackage{chngpage}
\usepackage{multicol}
\usepackage{xparse}
\usepackage{everypage}
\usepackage{afterpage}
\usepackage{pdfpages}
\usepackage{etoolbox}
\usepackage{indentfirst}
\usepackage{relsize}
\usepackage{endnotes}
\usepackage{placeins}
\usepackage{flafter}
\usepackage{inconsolata}
\usepackage{fancyvrb}
\usepackage{listings}
\usepackage{letltxmacro}
%\usepackage[framemethod=TikZ]{mdframed}
%\usepackage{xpatch}
%\usepackage{atbegshi}
%\usepackage{movie15}
%\usepackage{xfrac}

\scrollmode

%\batchmode
\begin{document}\scrollmode%\chapendfootnote

\batchmode\end{document}


Using miktex 2.9. It could be my install but this should work(again, it used to)

• Try to add a mwe! – CarLaTeX Dec 19 '16 at 5:21
• And does it 'stall' with the same error you want help with? Also: why are you using \batchmode if you are trying to find the source of the error? Same goes for the silence package. (And, off-topic, but the 'sorry' comment seems a little odd. Are you saying 'Sorry, I'm not willing to try to help the people who want to help me any further than what I've already done?' Given the fact that the code you've provided includes two efforts to suppress console or .log output, at best, this seems to be a warning to others to not try to help....) – jon Dec 19 '16 at 5:36
• @AbstractDissonance Your example is not minimal (many package) not complete (\begin{document}\scrollmode \par \batchmode\end{document} is just nothing, whatever preamble you use) – touhami Dec 19 '16 at 7:42
• He is pointing out that you are not typesetting anything in your non-minimal code. – jon Dec 19 '16 at 8:16
• Your example and Jons compiles fine on my miktex. Without a complete log-file I can't tell you what is different on your system. – Ulrike Fischer Dec 19 '16 at 8:17

This compiles fine (note what is commented out here: the \batchmode commands; the silence package, and the line with the luatex pacakge).

%\tracingall
\documentclass[12pt,oneside]{book}
%\batchmode

\usepackage[T1]{fontenc}
%\usepackage{silence}
\usepackage[x11names]{xcolor}
\usepackage[margin=1in,a4paper]{geometry} % a5paper for electronic reading
%\usepackage{luatex, graphicx}
\usepackage[space]{grffile}
\usepackage{tikz, pgffor}
\usepackage{pdfcolmk}
\usepackage{chngpage}
\usepackage{multicol}
\usepackage{xparse}
\usepackage{everypage}
\usepackage{afterpage}
\usepackage{pdfpages}
\usepackage{etoolbox}
\usepackage{indentfirst}
\usepackage{relsize}
\usepackage{endnotes}
\usepackage{placeins}
\usepackage{flafter}
\usepackage{inconsolata}
\usepackage{fancyvrb}
\usepackage{listings}
\usepackage{letltxmacro}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{xpatch}
\usepackage{atbegshi}
\usepackage{movie15}
\usepackage{xfrac}

%\scrollmode
%\batchmode
\begin{document}
%\scrollmode%\chapendfootnote

asdf % <-- add some content

%\batchmode
\end{document}


Remarks

• Do not use \batchmode if you don't know what it's for; and if you do know what it's for, you know that you should not use it when trying to find an error. Same for \scrollmode.

• Aguably, the silence package should not be used when trying to locate an error either. (However, it is probably fine in most cases to leave it in.)

• The package luatex.sty cannot be used with the pdfTeX engine, but other packages, such as fontenc indicate that you intend to use pdfTeX.

• If you give a 100+ files, you are probably not providing a minimal example, which is often required for others to provide a meaningful solution. (This is not about 'attitude', but general point about what is usually the best and quickest way to get a useful and/or meaningful solution.)

• Thus, if the file provided in the question is not meaningfully related to the 'real' problem with the 'real' file, there is no guarantee that solving the problems with the file given in the question will also solve the 'real' problem.

Edit

If you are using LuaTeX as the engine, for this example at least, you need to either not load movie15.sty (which is obsolete anyway) or load luatex85.sty, which helps deal with the major changes introduced in versions of LuaTeX > 0.80. But, as a general rule, you should also not load fontenc.

• You seem to fail to realize that the above code doesn't work on my system. Just because it works on yours does absolutely no good. I use lualatex as I said before. I also said all the code worked fine before I had to reinstall. So it is not my code, per se. You seem to be unfamiliar with programming and how dependencies and such and simply play the imitation game(on tex.stackexchange it is the MWE). In fact I have given a nearly MWE and MNWE... which is optimal. Sure, my real code might have issues but if the above cannot compile then my code can never compile. Do you not realize that? – AbstractDissonance Dec 19 '16 at 7:06
• I included all those packages BECAUSE they might have some interdependecies that's causing the problem. Again, whatever I am doing on top of the above code is irrelevant so please get it out of your head that more code is required. If lualatex cannot compile the above fine then it is not something I have done(as far as going is concerned). No amount of adding more complexity on top of the above code will solve the problem, no matter how much you want to believe it. – AbstractDissonance Dec 19 '16 at 7:08
• If the above compiles for you then it is a configuration problem on my end or you are using outside software that I used when it was working, that simple. If you truly want to help you would actually think about what is going on and report what versions of software you are using rather than asking for something that only gets further away from helping. – AbstractDissonance Dec 19 '16 at 7:09
• As I said, I am using miktex light 2.9. I have all the packages installed that I am using as far as I know(miktex will install packages on the fly that are missing). What latex configuration and version are you using? – AbstractDissonance Dec 19 '16 at 7:10
• I am not making ad hominem statements about your knowledge (or lack of knowledge about programming or TeX or anything; please do the same.) But, to reiterate: I am not asking for more code. I don't know how else to say that. If you are using LuaTeX, you need to say that up front. If you are using LuaTeX, then don't use fontenc. A MWE involves testing whether the same error appears when a package is loaded or not; that is your job when you build an MWE, not everyone else's. It is a trivial but time-consuming thing to do if you have loaded lots of packages. – jon Dec 19 '16 at 8:10