For some reason when I try to emit a QString I get a segfault.
void UDPClient
::logEvent( const QString & event,
int at_debug
) { stopper.lock();
emit debugEvent( event2 ); // <--- Segfaults right here
stopper.unlock();
}
void UDPClient::logEvent( const QString & event, int at_debug ) {
QString event2 = event;
stopper.lock();
emit debugEvent( event2 ); // <--- Segfaults right here
stopper.unlock();
}
To copy to clipboard, switch view to plain text mode
When I went digging through the backtrace I found it was trying to call all the connected slots using a Qt::AutoConnection.
if ((c->connectionType == Qt::AutoConnection
if ((c->connectionType == Qt::AutoConnection
To copy to clipboard, switch view to plain text mode
(According to the qtcreator debugger, c->connectionType was 0 which is the same as Qt::AutoConnection).
The strange part is the only connection I make to this signal I emit is to another signal in the QThread that owns this object. And it never reaches any slots.
Anyway, I can just comment it out for now, but I'd like to know what mistake I'm making.
Bookmarks