Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QNativeWifiEngine::closeHandle() triggered by QCoreApplication::aboutToQuit() throws an error, how to solve it?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    justDance
    wrote on last edited by
    #1

    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,

    1 Reply Last reply
    0
    • J Offline
      J Offline
      justDance
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved