I ve added the following to the
.pro file, if that matters:
Code:
QMAKE_CXXFLAGS_DEBUG *= -pg
QMAKE_LFLAGS_DEBUG *= -pg
I need to understand where to look when I get the following through
GDB:
The print statement shown in Green gets printed and then I receive the SEG fault, I don't know where the control goes then? Any hints?
Code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff2338910 (LWP 17107)]
QHostAddressPrivate::clear (this=0x0) at /var/tmp/qt-src/src/network/kernel/qhostaddress.cpp:292
292 /var/tmp/qt-src/src/network/kernel/qhostaddress.cpp: No such file or directory.
in /var/tmp/qt-src/src/network/kernel/qhostaddress.cpp
Relevant code:
This is a client server program. When the client gets closed, this gets called:
Code:
connect (objTcpSocketUtility->objTcpSocket, SIGNAL (error(QAbstractSocket::SocketError)), this, SLOT (socketError (QAbstractSocket::SocketError)), Qt::DirectConnection);
socketError calls
closeConnection
Code:
closeConnection()
{
objTcpSocketUtility->destroy_Socket ();
printf ("\n==========I think=====================\n");
}
and the
destroy_Socket contains this:
Code:
void destroy_Socket()
{
objTcpSocket->close ();
delete objTcpSocket;
objTcpSocket = NULL;
}