Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45798

OS X: QCoreWlanEnginePlugin eats huge CPU in almost idle app

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.10
    • 5.4.0
    • None
    • OS X 10.10.3 on MacBook Pro
    • macOS

    Description

      Any application on OS X with QCoreWlanEnginePlugin starts to use a huge amount of CPU each ten seconds, the more you have WiFi spots saved in your system (probably) the more it does.

      Even simple example can reproduce that, something like:

      #include "main.h"
      
      #include <QtCore/QTimer>
      #include <QtCore/QCoreApplication>
      #include <QtNetwork/QNetworkAccessManager>
      
      // cpu is hugely used only if qcorewlanengineplugin is imported
      #include <QtCore/QtPlugin>
      Q_IMPORT_PLUGIN(QCoreWlanEnginePlugin)
      
      int main(int argc, char *argv[]) {
      	QCoreApplication a(argc, argv);
      
              // quit in three minutes
      	QTimer::singleShot(180000, &a, SLOT(quit()));
      
              // cpu is hugely used only if manager is created
      	QNetworkAccessManager manager;
      
      	return a.exec();
      }
      

      TestApp.zip has XCode project with this test code, but it may not be very easy to launch because of some paths etc. maybe it will be an easy way just to create such sample project from scratch.

      Attachments

        1. cpuproblem1.png
          cpuproblem1.png
          62 kB
        2. cpuproblem2.png
          cpuproblem2.png
          336 kB
        3. TestApp.zip
          33 kB
        For Gerrit Dashboard: QTBUG-45798
        # Subject Branch Project Status CR V

        Activity

          People

            peter-har Peter Hartmann
            johnpreston John Preston
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes