Segmentation fault due to fill=false option in plots

Dear all I think I spotted an error in the plot command when using the option fill=false.

My FreeFem is the latest version installed from the develop branch, on Ubuntu 20.04. I tested this on two different machines. Does anyone has the same error with the following code?

mesh Th=square(10,10,[x,y]);
fespace Vh(Th,P2);
Vh f = x*y;
plot(f,wait=true,fill=true,cmm=“ok”);
plot(f,wait=true,fill=false,cmm=“not ok”);
cout << “finished” << endl;

1 Like

No problem on my end.

  -- Square mesh : nb vertices  =121 ,  nb triangles = 200 ,  nb boundary edges 40
finished
times: compile 0.005737s, execution 0.003363s,  mpirank:0
 CodeAlloc : nb ptr  3602,  size :461560 mpirank: 0
Ok: Normal End

Maybe something off with OpenGL though, I’ve only tested this on my macOS machine.

I have the same issue as @julienG, also on Ubuntu 20.04.
My OpenGL version is 3.0 Mesa 21.2.6 (from 2008), which might be a bit too old.
I can’t find any info on the required version in FreeFem, does anybody know where this can be found?

Update: I was able to run @julienG’s snippet, but only with a coarser mesh:

int n = 6;
mesh Th = square(n,n,[x,y]);

This managed to run sometimes, but other times it resulted in the same segmentation fault.
I’m pretty sure contour plots with finer meshes should be possible, but for me it seems like the mesh size is causing the issues.