Segmentation fault with signed distance


I have just installed FreeFem++ 4.7-1.
There is a segmentation fault when trying to use the external library “distance”.
I have already identify that the segmentation fault comes from the distance command and not from other things.
Here’s an extract of my code :

load “msh3”
load “distance”

real xA, yA, zA;
xA = 0.25; yA = 0.7; zA = 0.1;
real hmin1, hmax1;
real R = 0.05;

mesh3 Th, Th10, Th20, Th1, Th2;
Th10 = readmesh3(“mesh10.mesh”);

fespace Vh1(Th10,P1);
Vh1 o1, o1dist;

o1 = (x-xA)^2+(y-yA)^2+(z-zA)^2-R^2;
o1[] = o1dist[];

Is there something wrong with the execution of the command?

Thanks or your help!

Impossible to help without the mesh.

Here are the meshes and the code :

I don’t have any segfault. Are you sure you are using the distance plugin from your new installation, and not the one from your previous installation? Your main.edp is wrong, it should read o2[] = o2dist[];.
Also, Mmg is now interfaced in FreeFEM, you don’t need those exec command, you can just load mmg instead, see this example.

In fact, I don’t know which plugin is used. How can I get the information?

Thank you for the correction of the code and the precision about Mmg.

I uninstalled all my FreeFem versions and installed only the latest one. Everything is fine now.