# FreeFEM stalls after some time (probably) due to some exception

**URL:** https://community.freefem.org/t/freefem-stalls-after-some-time-probably-due-to-some-exception/586
**Category:** General Discussion
**Created:** [September 21, 2020, 3:59pm UTC](https://community.freefem.org/t/freefem-stalls-after-some-time-probably-due-to-some-exception/586 "2020-09-21T15:59:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![UgisL](https://avatars.discourse-cdn.com/v4/letter/u/c0e974/32.png) [@UgisL](https://community.freefem.org/u/UgisL)
#### Post date: [September 21, 2020, 3:59pm UTC](https://community.freefem.org/t/freefem-stalls-after-some-time-probably-due-to-some-exception/586/1 "2020-09-21T15:59:15Z")

</div>

Hi everyone,

I have encountered a strange issue which I have troubles of finding solution for. I am solving a coupled Cahn-Hilliard/Navier-Stokes system and stepping over time. The strange thing is that for a while the solver is happily working forward, but at some point it stalls. By increasing verbosity variable to 10000000 I have noticed that at the end I get the following messages:

> – Solve :  
> min -2.114 max 2.239  
> StackOfPtr2Free: clean 0x55f3c8693240  
> 0x55f3c82328b0=newstring((char\*) NS done )  
> NS done 0x55f3c82328b0freestring( NS done )  
> StackOfPtr2Free: clean 0x55f3c8698b80  
> catch E\_exception 4 0  
> eval vectorOfInst 0 0  
> StackOfPtr2Free: clean 0x55f3c82367d0  
> StackOfPtr2Free: clean 0x55f3c8698b80  
> catch E\_exception 4 0  
> eval vectorOfInst 0 0

And the last 4 lines seem to repeat indefinitely without any results.

Does anyone have any idea of what might be wrong? Or maybe have any additional suggestion of how to debug the code. I have been following the numerical solution, which seem to behave nicely.

My FreeFEM version:  
FreeFem++ - version 4.6 (Tue 16 Jun 2020 06:53:31 AM CEST - git v4.6-113-g243cbb52) 64bits  
compiled on Debian linux.

Best,  
Ugis Lacis  
KTH Engineering Mechanics

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [September 22, 2020, 9:36am UTC](https://community.freefem.org/t/freefem-stalls-after-some-time-probably-due-to-some-exception/586/2 "2020-09-22T09:36:21Z")

</div>

Can he see the code, because the line  
eval vectorOfInst 0 0  
is strange because the vectorOfInst is empty.  
F. Hecht

---

<div class="post-metadata">

### Author: ![UgisL](https://avatars.discourse-cdn.com/v4/letter/u/c0e974/32.png) [@UgisL](https://community.freefem.org/u/UgisL)
#### Post date: [September 22, 2020, 10:03am UTC](https://community.freefem.org/t/freefem-stalls-after-some-time-probably-due-to-some-exception/586/3 "2020-09-22T10:03:21Z")

</div>

Hi,

The code is a bit lengthy, but you are welcome to have a look (I sent you an e-mail, the forum did not allow me to attach the file). Let me know if you see anything strange there.

Best,  
Ugis

---

<div class="post-metadata">

### Author: ![UgisL](https://avatars.discourse-cdn.com/v4/letter/u/c0e974/32.png) [@UgisL](https://community.freefem.org/u/UgisL)
#### Post date: [September 23, 2020, 5:04am UTC](https://community.freefem.org/t/freefem-stalls-after-some-time-probably-due-to-some-exception/586/4 "2020-09-23T05:04:36Z")

</div>

Hi again,

Just to close the topic, Frederic helped me to find the issue, using “showCPU = 1” allowed to identify a loop my code got stuck into. So issue is fixed.

Best,  
Ugis
