[tex4ht] what would cause " Can't close file `index.tmp' (file is not open)" --- error --- Illegal storage address

Nasser M. Abbasi nma at 12000.org
Fri May 25 07:34:09 CEST 2018

This is on texlive 2017. I have large index.tex file, compiling
to HTML. It compiles OK to pdf. about 600 pages.

Near the end, with make4ht, after this command

make4ht --shell-escape --lua -u -c nma.cfg  -e main.mk4 index.tex "htm,3,pic-align,notoc*"

I keep getting an error on a file called index.tmp:

Compiler:       dvilualatex
Latex options:  -shell-escape -jobname=index
tex4ht.sty :    /cygdrive/x/data/HOME/nma.cfg,htm,3,pic-align,notoc*,charset=utf-8
tex4ht   -cmozhtf -utf8
build_file      /cygdrive/x/data/HOME/main.mk4
Using build file        /cygdrive/x/data/HOME/main.mk4
setting param correct_exit
Adding:         packages        \RequirePackage[dvipdfmx]{graphicx}
setting param correct_exit
setting param correct_exit
setting param correct_exit
setting param ext
setting param ext
Adding:         ext     dvi
LaTeX call: dvilualatex -shell-escape -jobname=index  '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g at addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}\RequirePackage[dvipdfmx]{graphicx}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode /cygdrive/x/data/HOME/nma.cfg,htm,3,pic-align,notoc*,charset=utf-8.a.b.c.\input index.tex'
This is LuaTeX, Version 1.0.4 (TeX Live 2017)
  system commands enabled.

Output written on index.dvi (402 pages, 2412000 bytes).
Transcript written on index.log.
Make4ht: tex4ht  -cmozhtf -utf8 "index.dvi"
tex4ht.c (2012-07-25-19:36 kpathsea)
tex4ht -cmozhtf
  file index.tmp
  file index.tmp
  file index.tmp
] [21 file index.tmp
--- warning --- Can't close file `index.tmp' (file is not open)
--- error --- Illegal storage address
Make4ht: Fatal error. Command tex4ht returned exit code 256

I removed all temporary files. Tried this on both linux and
cygwin. And still get this error.

Has any one seen such an error before. I am not sure where
to look to debug this more now. THe file index.tmp at the end
looks to be corrupted. It has size of one byte only.

At the end, I see index.idv having zero byte size and index.tmp
having 1 byte size. So something went wrong.

Any idea what to look for or try? I put index.log and
index.tmp  files here


if someone wants to look at them.

Will keep trying to find what is wrong.
thanks for any hints.



More information about the tex4ht mailing list