When codestyle.py outputs too slowly (or unexpectedly), restart it instead of crashing.
codestyle.py is too slow in outputting data, the
processOutputStarted function might miss them, release the
m_mutex lock and set
m_stylechecker to nullptr.
When the data then later arrives, processOutputStarted is called
again, however without
m_mutex being held and
no longer valid. This eventually leads to a crash when dereferencing
The current commit tries to fix this by checking that
held at the start of
processOutputStarted. If it is not, then we are
in the "late data case". However, in this situation, we do not know
the amount of data that should still arrive and basically the only
way to solve the situation, is to kill the server (and start it again
on the next run). So that is what we do.