put server on heap so it doesn't get dtor'd in the wrong thread
destroying (parented) objects causes event posting which would be happening across threads when the server is on the stack and gets destroyed from the main thread rather than the loop thread. simply allocate it on the heap so it gets cleaned up along with its parenting qthread rather than the stack unwind. QFATAL : Bugzilla::ConnectionTest::testPut() ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread 0x0x6020000000b0. Receiver '' (of type 'QNativeSocketEngine') was created in thread 0x0x7fffffffc420", file kernel/qcoreapplication.cpp, line 577
parent
150f7bd1
Please register or sign in to comment