I am making a book that includes a series of maps which I created in LibreOffice Draw, but exported as a lossless PDF. After recently making some improvements to the map files, but not the ConTeXt documents, I was surprised my document wouldn't compile anymore...I couldn't find any code errors and even reverted to older code from the day before that compiled fine yesterday. It seemed the PDFs themselves were making the errors, but the errors were inconsistent.. I deleted my ConTeXt install and downloaded the latest version of standalone, it still won't compile, but the errors are completely different. After a few tests I came up with this minimal code which throws the error:

\starttext

    \externalfigure[xmap1]

\stoptext

If I compile this, and xmap1.pdf is a PDF file in the same path, it outputs this error:

lua error       > lua error on line 4 in file ./test.tex:

registered function call [1606]: ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:175: stack overflow
stack traceback:
        ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:175: in function <...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:167>
        (...tail calls...)
        ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:667: in for iterator 'for iterator'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:96: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...     (skipping 99976 levels)
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in upvalue 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:97: in local 'strip'
        ...-context/tex/context/base/mkxl/lpdf-fix-imp-contents.lmt:108: in upvalue 'document_pdf_strip_page'
        [string "local lpdf_epdf_contentplugin = lpdf.epdf.con..."]:7: in local 'runner'
        ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-fix.lmt:136: in field 'pageplugin'
        ...ext/tex/texmf-context/tex/context/base/mkxl/lpdf-pde.lmt:1401: in upvalue 'copypage'
        ...ext/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:126: in function <...ext/tex/texmf-context/tex/context/base/mkiv/grph-chk.lua:111>
        ...ext/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1696: in function <...ext/tex/texmf-context/tex/context/base/mkxl/grph-inc.lmt:1681>
        (...tail calls...)
1     \starttext
2     
3       \externalfigure[xmap1]
4 >>  
5     \stoptext
6     
mtx-context     | fatal error: return code: 1

This error isn't occurring for every PDF, some of them are rendering with no such error. I tried different export settings in LibreOffice Draw, but that seemed to have no impact. Some files render in ConTeXt and some throw this error.

What is happening?

--Joel