PDA

View Full Version : Sql error comming from nowhere



Cerberus
21st October 2015, 20:51
I have a client connected to a server, and it is also connected to a Sqlite3 database. When I receive a message from the server a get an QMessageBox showing an error "No query Unable to fetch row".
I tried it with qDebug() outputs and by Debugging the application but the message is not produced by me nor thrown by any DB execution, since none is executed at the moment when I get the message.
I tried it with to debug everything and I found out that even before the 'readyRead()' from an incomming message is even called from the socket connection to the server I receive the error message!?
Does anyone know how I figure out where it comes from?

Cerberus
22nd October 2015, 13:29
Ok I figured out that the error is shown when I write something to the socket. The error does not affect anything, the program continues to run. Here is the code piece were the error is shown:



void ConnectionHandler::sendBytes(QByteArray bytes) {
QMessageBox::critical(0, "test", "test");
this->socket->write(bytes);
this->socket->flush(); // after this call the error message is shown
this->socket->waitForBytesWritten();
QMessageBox::critical(0, "test2", "test2");
}



I checked the bytes that are supposed to be written but they look like what they are supposed to!?

This is the error:
11465