View Full Version : Stranger Error

8th September 2008, 22:51
In my program draw a path and this path is changing continuously(in a thread), but suddenly appear this error in GDB:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5fffb90 (LWP 8229)]
0xb78b60f1 in QRegionPrivate::append (this=0xb6002e48, r=0xb60086f8)
at ../../include/QtCore/../../src/corelib/tools/qrect.h:245
245 { return y1; }
Current language: auto; currently c++

What could be?

8th September 2008, 23:23
What synchronization mechanism do you use and does this thread do exactly?

10th September 2008, 01:56
The thread (is a QThread) calculate the path, in the main thread (in the interface) draw the path .

I use connect (direct connect) to singals for draw.

10th September 2008, 10:45
I use connect (direct connect) to singals for draw.
If you use a direct signal, then the drawing is also done in that non-GUI thread, which is Bad(tm).

Use a queued connection to send an updated path to the GUI thread or use a mutex to protect the path while you draw it.