Thanks for your reply.
It is most probably about memory management issue. I call repaint function with timer(per 50 ms). I have 4 worker threads that fills 4 separate arrays and after each 50 ms I call repaint to draw the values to the screen. The gui thread works well until 45 minutes passed, then paint function is not called anymore. I'm clearing arrays in paint function so this might be the cause. The arrays causes segmentation fault some way and programs blows up. By the way, commenting out other 3 threads, with 1 working worker thread it takes about 55 minutes program to be killed.