See this bug:
crash: Xlib: unexpected async reply
The cause of this bug is the use of QMessageBox inside a non-main thread. So, as a quick hack, I'm attaching a patch that replaces these 'QMessageBox'es with simple std::cerr.
This patch also reduces the GUI update delay from 100ms to 32ms, which makes the white line move a lot smoother. It also removes the annoying "The subtitles" tooltip at main QTable.
Finally, I also moved the calculations that were previously done inside critical area (inside mutex lock). I think any program should stay in locked state as little as possible, so I moved them to just before or after the lock.
I still did not have enough time to test this patch, but I guess it should work without many problems.