qt4 qtcpsocket read报错
下面是我的read过程:
qDebug()<<"in readMsg 1.";
if(this->getConnectState()&&(this->qTcpSocket->isReadable())&&(this->qTcpSocket->bytesAvailable()>5))
{
qDebug()<<"in readMsg 2.";
if(qTcpSocket->waitForReadyRead())
{
qDebug()<<"in readMsg 3.";
readbuf=qTcpSocket->readAll();
qDebug()<<"in readMsg 4.";
}
else
{
qDebug()<<"waitForReadyRead=false.";
return;
}
}
else
return;
然后发现,调试的时候,有时候打印到in readMsg 3之后,去处理其他线程了。然后报:
*** glibc detected *** ./NetLoadTerminal: corrupted double-linked list: 0x42e04130 ***
有哪位带哥遇到过这样的问题吗?