Thank you very much @Bakasura , I rewrote the code, this is a bit messy because my only intention was to understand why the terminate () didn’t work, maybe it was wrong, I will try, if successful I update you here ..
1615132899
@Bakasura I tried here with your code and with a more organized...