ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Why are some external PDF figures leading to a stack overflow error?
       [not found] <1543773779.4842749.1723992557697.ref@mail.yahoo.com>
@ 2024-08-18 14:49 ` Joel via ntg-context
  2024-08-18 15:10   ` [NTG-context] " Mikael Sundqvist
  0 siblings, 1 reply; 5+ messages in thread
From: Joel via ntg-context @ 2024-08-18 14:49 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: Joel


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

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


[-- Attachment #1.2: Type: text/html, Size: 5509 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Why are some external PDF figures leading to a stack overflow error?
  2024-08-18 14:49 ` [NTG-context] Why are some external PDF figures leading to a stack overflow error? Joel via ntg-context
@ 2024-08-18 15:10   ` Mikael Sundqvist
  2024-08-18 15:16     ` Joel via ntg-context
  2024-08-18 15:17     ` Joel via ntg-context
  0 siblings, 2 replies; 5+ messages in thread
From: Mikael Sundqvist @ 2024-08-18 15:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Why are some external PDF figures leading to a stack overflow error?
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Joel via ntg-context @ 2024-08-18 15:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Joel


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

 The file compiles and just has a grey empty box saying "name: unknownpicture".
If I replace xmap1.pdf with a JPG named xmap1.jpg and don't change the document otherwise, my document compiles just fine. The problem is I need high quality files, not a blurry JPG.
--Joel

    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: 9595 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Why are some external PDF figures leading to a stack overflow error?
  2024-08-18 15:10   ` [NTG-context] " Mikael Sundqvist
  2024-08-18 15:16     ` Joel via ntg-context
@ 2024-08-18 15:17     ` Joel via ntg-context
  1 sibling, 0 replies; 5+ messages in thread
From: Joel via ntg-context @ 2024-08-18 15:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Joel


[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: Why are some external PDF figures leading to a stack overflow error?
  2024-08-18 15:16     ` Joel via ntg-context
@ 2024-08-18 15:25       ` Mikael Sundqvist
  0 siblings, 0 replies; 5+ messages in thread
From: Mikael Sundqvist @ 2024-08-18 15:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

The unknownpicture was there to hint that you did not give an example
showing the problem. The compact= was an initial guess by an anonymous
participant at the meeting.

Den sön 18 aug. 2024 17:20Joel via ntg-context <ntg-context@ntg.nl> skrev:

> The file compiles and just has a grey empty box saying "name:
> unknownpicture".
>
> If I replace xmap1.pdf with a JPG named xmap1.jpg and don't change the
> document otherwise, my document compiles just fine. The problem is I need
> high quality files, not a blurry JPG.
>
> --Joel
>
> 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
>
> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> 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: 10926 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-18 15:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1543773779.4842749.1723992557697.ref@mail.yahoo.com>
2024-08-18 14:49 ` [NTG-context] Why are some external PDF figures leading to a stack overflow error? 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 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).