There is already an event loop running for the thread. That is not the problem. Also, the problem is that I am NOT getting a premature end of document. My code is already structured in a way that looks for this error code and does a waitForReadyRead on the device associated with the xml reader. As per Qt's documentation calling wait for ready read from within a ready read signal handler is permitted. Doing this will NOT recursively emit the readyRead signal.

Anyway, the end result here seems to be an error in the way that Qt is processes the XML document if the total size of the document exceeds their internal buffer. Since one batch of text I stream over the socket from a test client exceeds that buffer size, the half tag that is at the end of the buffer is then parsed incorrectly. I end up with a parsing error rather than a premature end of document error. Since I can't distinguish between a real parse error and one generated from this apparently code glitch there is no way to take action here.