Good morning. I am new on this site, but am a French engineer with over 30 years of programming and debugging experience, mostly in C/C++. I have already worked on multithreaded UDP code and have dealt with several cases of double memory releases and memory corruption, which is clearly what you face here. If the memory is released twice, it should be easy to fix. It is trivial if the bug is within one thread, otherwise, it could require adding synchronization. In the case of a corruption, it can be tricky - there is no method that works in all cases -. However, I've already tackled such situations, and with code instrumentation, there is a high chance your bug can be found. Even just code inspection might work. Anyway UDP code is usually rather small. The most important thing is the environment. You didn't indicate the OS you are using for development, which is of uttermost importance for developers. I would be glad to help you with your project, but can only work on your code if it can be compiled and run on Windows - my favorite, especially if you use Visual Studio instead of gcc - or on a Ubuntu virtual machine. In case you choose to work with me, could you provide me with a use case in which the bug is easy to reproduce? Expecting to hear from you soon, yours sincerely, Joël Vibert