I have that weird bug which crashes my program. It crashes randomly (about 2 crashes per 50 times where everything works fine). GDB says segfault is from function with only this