I think it was the latter. Now I have fixed the problem and improved the code in many aspects (for example as said before by replacing the semaphore with task notifications) and I have a very high pile of items in my todo list unfortunately. I will see if I can squeeze some time to revert the SW and plugin a debugger to verify.