-
QTcpServer and GDB
I have a little server that uses QTcpServer and when i run it through my debugger (GDB) , it will give me a segmentation fault
It will fault @QTcpServer::listen() method.
but without the debugger meaning run and compiled it with debug mode it runs fine and happy?
this really confused the heck out of me? anybody knows why?
baray98
-
Re: QTcpServer and GDB
You have "undefined behaviour" somewhere in your code. As debug and release builds have different memory layouts, and different timings - esp. when run in gdb - you are 'lucky' to get the crash and thus notice an error in your code.
If you crash in that method, I would guess that the QTcpServer is not a valid object.
For real answers, we need to see your code. Try to strip it down to the relevant parts and provide a compilable example please.
-
Re: QTcpServer and GDB
I have fixed my problem by upgrading my GDB from 6.3 to 6.7