I have two threads
1) Main GUI Thread
2) A QThread based Thread called DataFetcher

DataFetcher gets data from Systems Message Queue (say a pointer to a C structure). It has to pass the data to Main GUI Thread. Before calling DataFetcher->start() I have established QT::Queued signal and slot connection. However initially I was emiting a pointer to my C structure as parameter in signal
stUIControlAndData *aCtrlNDataPtr = ....;
.....
e.g. emit dataFetchedFromQueue(aCtrlNDataPtr)

I read the QT doc and stuff it says
To quote from qt documentation

"With queued connections, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the arguments to store them in an event behind the scenes. If you try to use a queued connection and get the error message QObject::connect: Cannot queue arguments of type 'MyType' call qRegisterMetaType() to register the data type before you establish the connection."

Source: http://doc.trolltech.com/4.2/qt.html...ctionType-enum

Any class or struct that has a public constructor, a public copy constructor, and a public destructor can be registered."
http://doc.trolltech.com/4.2/qmetaty...gisterMetaType

So passing pointer (stUIControlAndData*) seems wrong.

Am I thinking on the right lines. There are arbitary crash with my app, stack trace always goes into GUI and into QT calls which inturn leads in malloc (libc).

I also what to say I changes the who design and code to pass GUI C++ based class that corresponds to (stUIControlAndData). I am not passing pointers anymore. Create on the stack of DataFetcher Thread and pass it to GUI Main Thread.

I wish I could just post the code and make my life easier. However thats not an option.

Bottomline: I am trying to debug the app which crashes shows QT stack trace. I suspect that may be the way data is passed between the two GUI Threads has some problem.