Access violation in generated code when reading 0xffffffffffffffff
unitscan opened this issue · 1 comments
Reading the various answers on this site, I tried a way to convert a .tex file containing images generated with tikz into an editable format with MS Word. I followed the various instructions exactly, but the command prompt gives me this error:
Access violation in generated code when reading 0xffffffffffffffff
Attempting to reconstruct a stack trace...
Frame Code address
- 0xf6875ad200 0x7ff73ca0ef6e C:\Program Files\Pandoc\pandoc.exe+0x2c9ef6e
- 0xf6875ad208 0x61636f4c5c617461
- 0xf6875ad210 0x735c706d65545c6c
- 0xf6875ad218 0x302e387738
- 0xf6875ad220 0x2e641a704e8
- 0xf6875ad260 0x7ff73e43b02f C:\Program Files\Pandoc\pandoc.exe+0x46cb02f
- 0xf6875ad2c0 0x7ff73e42b5f4 C:\Program Files\Pandoc\pandoc.exe+0x46bb5f4
- 0xf6875ad3e0 0x7ff73e4329b8 C:\Program Files\Pandoc\pandoc.exe+0x46c29b8
- 0xf6875ad420 0x7ff73e42b791 C:\Program Files\Pandoc\pandoc.exe+0x46bb791
- 0xf6875ad590 0x7ff73e42a7f8 C:\Program Files\Pandoc\pandoc.exe+0x46ba7f8
- 0xf6875ad5f0 0x7ff73e42bcf5 C:\Program Files\Pandoc\pandoc.exe+0x46bbcf5
- 0xf6875ad650 0x7ff73ca0926d C:\Program Files\Pandoc\pandoc.exe+0x2c9926d
- 0xf6875ad690 0x7ff73a73c531 C:\Program Files\Pandoc\pandoc.exe+0x9cc531
- 0xf6875ad698 0x7ff73ada0c57 C:\Program Files\Pandoc\pandoc.exe+0x1030c57
- 0xf6875ad6a0 0x7ef4a1f26200
- 0xf6875ad6a8 0x10
I used this comand line: pandoc --from latex+raw_tex --lua-filter=tikz.lua -s test.tex -o test.docx
The tex code is as follows
\documentclass{article}
\usepackage{amsmath,tcolorbox,tikz}
\begin{document}
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]
Some content and an equation $a=b$
\end{tcolorbox}
\begin{center}
\begin{tikzpicture}
\draw (0,0) -- (4,4);
\end{tikzpicture}
\end{center}
\end{document}
The Lua script is https://gist.github.com/gfacciol/4099a3e28a2a29611d1d3323071f7be0
The same command without Lua script works. Of course, only text on the outpit file.
Pandoc version: 3.1.13
OS: Windows 10
I suspect this has to do with that Lua script (which obviously wasn't written with Windows in mind - note the \n
line endings).
I don't think it is an issue in pandoc itself, and I can't diagnose further because I don't have a Windows box. I'll convert this to a Discussion item; maybe someone will have advice.