ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Joel via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Joel <uaru99@yahoo.com>
Subject: [NTG-context] Re: Why are some external PDF figures leading to a stack overflow error?
Date: Sun, 18 Aug 2024 15:17:28 +0000 (UTC)	[thread overview]
Message-ID: <927219952.4079963.1723994248773@mail.yahoo.com> (raw)
In-Reply-To: <CAHy-LL_L+ZwomoBXic6axfj-WUm0HS=6UQcQNG3MScK=+i=heQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 5293 bytes --]

 If I add [compact=] it seems to be rendering the PDF. What does [compact=] do?

    On Sunday, August 18, 2024 at 09:14:37 AM MDT, Mikael Sundqvist <mickep@gmail.com> wrote:  
 
 Hi,

>From the meeting: What happens if you do

\externalfigure
  [unknownpicture]
  [compact=]

?

On Sun, Aug 18, 2024 at 4:53 PM Joel via ntg-context <ntg-context@ntg.nl> wrote:
>
> 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
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki    : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki    : https://wiki.contextgarden.net
___________________________________________________________________________________
  

[-- Attachment #1.2: Type: text/html, Size: 9248 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

      parent reply	other threads:[~2024-08-18 15:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1543773779.4842749.1723992557697.ref@mail.yahoo.com>
2024-08-18 14:49 ` [NTG-context] " Joel via ntg-context
2024-08-18 15:10   ` [NTG-context] " Mikael Sundqvist
2024-08-18 15:16     ` Joel via ntg-context
2024-08-18 15:25       ` Mikael Sundqvist
2024-08-18 15:17     ` Joel via ntg-context [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=927219952.4079963.1723994248773@mail.yahoo.com \
    --to=ntg-context@ntg.nl \
    --cc=uaru99@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).