vectorgraphics / asymptote

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

WebGL or SVG output: XML Error for draw(unitcircle) #375

Closed kiryph closed 1 year ago

kiryph commented 1 year ago
// file: demo-unitcircle.asy
draw(unitcircle);

PDF Output: Screenshot 2023-04-27 at 13 49 38

Changing the output to WebGL

asy -f html demo-unitcircle.asy

or SVG

asy -f svg demo-unitcirlce.asy

compilation fails and returns

XML error: error in path data: number expected (premature end of data)
  _shipout(prefix,f,currentpatterns,format,wait,view,t);
          ^
/usr/local/Cellar/asymptote/2.85/share/asymptote/plain_shipout.asy: 116.11: runtime: shipout failed

My environment

❯ asy --version
Asymptote version 2.85 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]

ENABLED OPTIONS:
V3D      3D vector graphics output
WebGL    3D HTML rendering
OpenGL   3D OpenGL rendering
GSL      GNU Scientific Library (special functions)
FFTW3    Fast Fourier transforms
XDR      External Data Representation (portable binary file format for V3D)
CURL     URL support
Readline Interactive history and editing
GC       Boehm garbage collector
threads  Render OpenGL in separate thread

DISABLED OPTIONS:
SSBO     GLSL shader storage buffer objects
Eigen    Eigenvalue library
LSP      Language Server Protocol
Sigsegv  Distinguish stack overflows from segmentation faults
kiryph commented 1 year ago

I close this issue as it seems to be an issue in the SVG parser of dvisvgm.