SIGSEGV Segmentation Fault after connectToHostEncrypted
-
Can you show your .pro file ?
Which Linux distribution are you using ?
Which version of GDB ? -
To localize the problem it could be a good idea to use the qt-libraries with symbols (debug version of qt-build)
-
main.cpp : https://pastebin.com/cPjTKygq
qtsslreceiver.cpp : https://pastebin.com/dEtj6E7n
qtsslreceiver.h : https://pastebin.com/TzcktAay
qtsslreceiver.pro : https://pastebin.com/KujH0e8k
qtsslreceiver.ui : https://pastebin.com/kLxVkFxEI dont know, how enable Drag and Drop for this forum.
-
Hi
One thing that i noted.
you define
QSslSocket *msocket;
but do not set to nullptr
and then use it latervoid QtSslReceiver::OnConnect(const QString &hostname,unsigned short port) { if (!msocket) <<<< Might not be null, might be random value here { msocket = new QSslSocket(this); xx } msocket->ignoreSslErrors(); <<< Might crash hereTo check if that
just try
msocket=nullptr; ( or set it to null in .h)
OnConnect("kapitanf.ddns.net", 5000);Thats stops it crashing here when i run it.
-
Oh super . it was only that. the revenge of the uninitialized variable. ;)