# Segmentation fault due to fill=false option in plots

**URL:** <https://community.freefem.org/t/segmentation-fault-due-to-fill-false-option-in-plots/1348>\
**Category:** General Discussion\
**Created:** [November 25, 2021, 2:25pm UTC](https://community.freefem.org/t/segmentation-fault-due-to-fill-false-option-in-plots/1348 "2021-11-25T14:25:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![julienG](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/julieng/32/222_2.png) [@julienG](https://community.freefem.org/u/julienG)\
**Post date:** [November 25, 2021, 2:25pm UTC](https://community.freefem.org/t/segmentation-fault-due-to-fill-false-option-in-plots/1348/1 "2021-11-25T14:25:55Z")

</div>

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;

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [November 25, 2021, 2:29pm UTC](https://community.freefem.org/t/segmentation-fault-due-to-fill-false-option-in-plots/1348/2 "2021-11-25T14:29:12Z")

</div>

No problem on my end.

```auto
  -- 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.

---

<div class="post-metadata">

**Author:** ![peltBartvan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/peltbartvan/32/1078_2.png) [@peltBartvan](https://community.freefem.org/u/peltBartvan)\
**Post date:** [April 5, 2022, 2:22pm UTC](https://community.freefem.org/t/segmentation-fault-due-to-fill-false-option-in-plots/1348/3 "2022-04-05T14:22:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![peltBartvan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/peltbartvan/32/1078_2.png) [@peltBartvan](https://community.freefem.org/u/peltBartvan)\
**Post date:** [April 5, 2022, 3:01pm UTC](https://community.freefem.org/t/segmentation-fault-due-to-fill-false-option-in-plots/1348/4 "2022-04-05T15:01:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [January 25, 2023, 5:39pm UTC](https://community.freefem.org/t/segmentation-fault-due-to-fill-false-option-in-plots/1348/5 "2023-01-25T17:39:18Z")

</div>

I just ran it worked ok. Did you try running under gdb?  
gdb --args FreeFem++ whatever.edp
