#1012778 asymptote: Asymptote can't render static images

Package:
asymptote
Source:
asymptote
Description:
script-based vector graphics language inspired by MetaPost
Submitter:
Alexandre Lymberopoulos
Date:
2022-06-18 23:42:03 UTC
Severity:
normal
#1012778#5
Date:
2022-06-13 22:44:13 UTC
From:
To:
Dear Maintainer,

I'm trying to render the intersection of two cylinders here. Everything runs fine when output is an HTML file, but changing the outformat to PDF or PNG produce the following output on terminal:

X Error of failed request:  GLXBadFBConfig
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  0 ()
  Serial number of failed request:  43
  Current serial number in output stream:  43

I'm totally clueless on what's going on. Here is the asy file content:

import solids;

settings.outformat = "html";

currentprojection=orthographic(3,2,3);
limits((-2,-2,-2),(2,2,2));

currentlight=light(white,(2,2,2),(2,-2,-2));

revolution cil=cylinder((-1.5,0,0),1,3,(3,0,0));

surface s1 = surface(cil);
surface s2 = rotate(90,Z)*surface(cil);

draw(s1, lightblue+opacity(0.8));
draw(s2, orange+opacity(1.0));

And the "trimmed" version of it:

import graph3;

settings.outformat = "html";

currentprojection=orthographic(3,2,3);
limits((-2,-2,-2),(2,2,2));

currentlight=light(white,(2,2,2),(2,-2,-2));

triple cil1(pair z) {
  real r=z.x;
  real t=z.y;
  real x=-r*sqrt(1-t^2);
  real y=-sqrt(1-t^2);
  real z=t;
  return (x,y,z);
}

surface s1 = surface(cil1,(-1,-1),(1,1),nu=1,nv=200);
surface s2 = reflect(O,X,Z)*s1;
surface s3 = rotate(90,Z)*s1;
surface s4 = rotate(-90,Z)*s1;

draw(s1,lightblue); //+opacity(0.8));
draw(s2,lightblue); //+opacity(0.8));
draw(s3,orange); //+opacity(0.8));
draw(s4,orange); //+opacity(0.8));

Please let me know if anything else will help to understand the
problem.

Best, Alexandre

#1012778#10
Date:
2022-06-16 22:11:01 UTC
From:
To:
Am 14.06.2022 um 00:44 teilte Alexandre Lymberopoulos mit:

Hi,
Works fine here. I'm pretty sure the error message is unrelated to
asymptote. When googling for the first line, one finds for example this
URL [1]. Does that describe and (eventually solve your issue)?

Hilmar

[1]
https://askubuntu.com/questions/1369900/x-error-of-failed-request-glxbadfbconfig

#1012778#15
Date:
2022-06-18 23:38:43 UTC
From:
To:
Hi there, Hilmar!

In fact, for some reason, setting that environment variable makes
asymptote render the static images in png and PDF formats.

I'll dig into this and check if it is necessary to file this on any
other package. Thanks for your prompt reply.

Best,
Alexandre