This is most probably some uninitialized variable or memory somewhere in your program.
If you're using threads it might be some race condition.
There are plenty of tools you can use to find it: compiler warning, debugger, printf, valgrind, clang address sanitizer, etc...