QNativeWifiEngine::closeHandle() triggered by QCoreApplication::aboutToQuit() throws an error, how to solve it?



  • I have a client GUI application. I created a worker thread for network communication. In MainWindow destructor I deleted this worker thread. Now when I exit the application, from the back trace I can see after MainWindow destructor is called, QCoreApplication::aboutToQuit() will trigger QNativeWifiEngine::closeHandle(), and there it throws a First-chance exception with error "The data is invalid." , and it's running in a Win32 worker thread.

    Before I moved network communication to a worker thread, I didn't have this error. Does this mean I deleted something which is supposed to be deleted by QNativeWifiEngine? So I should not delete my network communication worker thread in MainWindow destructor?

    Thanks,



  • more info: Before I moved network communication to a worker thread, I also delete server connection object in MainWindow destructor. So the only difference is that before server connection object was deleted in main thread, now it is deleted in worker thread, and the worker thread is also deleted in MainWindow destructor.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.