vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
547 stars 90 forks source link

3D latex pdf render hangs in 2.77 #302

Closed zarniwhoop73 closed 2 years ago

zarniwhoop73 commented 2 years ago

Just advance notice that I've started to test 2.77 on linux and my 3D 'cylinder' test from [https://www.linuxfromscratch.org/~ken/tex-testfiles/[latex-test-20211230.tar.xz](https://www.linuxfromscratch.org/~ken/tex-testfiles/latex-test-20211230.tar.xz)] hangs when rendering (x86_64, amdgpu in Xorg, texlive-2021 but everything else is recent)

My separate tests of asy without latex appear to be ok. Last known good version was 2.70, will start to bisect versions - this will take a few days.

I'll add that I've disabled LSP for this build, will raise a separate issue asking for clarification on that.

johncbowman commented 2 years ago

Version 2.77 is now obsolete; however, I tested the attached file with both 2.77 and the current version, 2.78. The generated cylinder appears fine to me. I've attached cylinder.tex for everyone's convenience. Here are the instructions to test it:

gunzip cylinder.tex.gz
pdflatex cylinder
asy cylinder-*.asy
pdflatex cylinder

cylinder.tex.gz

zarniwhoop73 commented 2 years ago

On Sat, Feb 05, 2022 at 07:39:01PM -0800, John Bowman wrote:

Closed #302.

-- Reply to this email directly or view it on GitHub: https://github.com/vectorgraphics/asymptote/issues/302#event-6014552589 You are receiving this because you authored the thread.

Message ID: @.***>

John,

Thanks for attaching the example and lsiting the cut-down commands. There were two differences from what I was running:

  1. An extra run of pdflatex at the end.

  2. You removed the -V from 'asy -V'.

The extra run of pdflatex seems harmless, but is clearly not needed for the single image.

Removing the '-V' (i.e. run 'asy cylinder-.sy' instead of 'asy -V cylinder-.asy' makes the difference. I went back to 2.70 in testing, there -V was harmless. In all later versions -V causes what I'll call the temporary rendering window (normally just an outline) to have contents - mostly thos hind at the cylinder, as if seen through haze, but with 2.78 a recognizable cylinder appears. In all cases, the process hung until I closed that temporary window, then the a pdf was created with only the label, not the image.

Leaving this message in case anyone else gets a similar problem.

ĸen -- Nac Mac Feegle! The Wee Free Men! Nae king! Nae quin! Nae laird! Nae master! We willna' be fooled again!

johncbowman commented 2 years ago

The instructions I posted came from the Asymptote manual; the extra -V option you added would only be desirable if you want to view the image in an OpenGL rendering window. It doesn't actually hang; it just waits for the user to press "e" for export or "q" for quit, etc. This could be useful if you wanted to change the camera viewpoint before rendering; but otherwise, you don't need the -V option in this context.

The -V option should have been respected by version 2.70 but apparently that was a bug.

The second pdflatex is not optional; it is required to actually embed cylinder-1.pdf into cylinder.pdf.