views:

591

answers:

2

I have a QT program which displays the data it receives over UDP. It works fine for around 30 seconds but after a while it gives Segmentation Fault and crashes. This 30 seconds is also not fixed.

I used the debugger and got this

Program received signal SIGSEGV, Segmentation fault. 0x003c6fd4 in ?? () from /usr/lib/libQtGui.so.4

Can anyone tell me where the error might be

+3  A: 

It means your program has tried to access memory that doesn't belong to it. Basically, you have a pointer that contains an invalid value somewhere in your code - a common source of this error is dereferencing a NULL pointer.

anon
There could be a bug in the QT code of course.
Martin Wickman
@wic Never think like that until you have exhaustively proved there is no bug in YOUR code.
anon
There was no bug in the Qt code obviously it was a silly mistake on my part.
+1  A: 

You need a debugger (and make sure you have binaries with debug information) -- check the stack trace at the crash site. I'd pretty much assume your own code will appear somewhere, and this is the point to start with. Check allocations, buffer sizes …

Alexander Gessler
Yah the debugger was of great help. Havent used it much before.