Threads in NDK and now it does not freeze - just closes