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

Crash in QWebEngineUrlSchemeHandler handling

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.6.0
    • Fix Version/s: 5.6.2
    • Component/s: WebEngine
    • Labels:
      None

      Description

      Following app crashes webengine

      class SchemeHandler : public QWebEngineUrlSchemeHandler
      {
          public:
          SchemeHandler():QWebEngineUrlSchemeHandler(){}
          virtual void requestStarted(QWebEngineUrlRequestJob *request) {
              qDebug() << "requestStarted()";
          }
      };
      
      int main(int argc, char** argv)
      {
          QApplication app(argc, argv);
          QWebEngineProfile* p = QWebEngineProfile::defaultProfile();
          QWebEngineView *view = new QWebEngineView();
          view->load(QUrl("qrc:/file.html"));
          QTimer::singleShot(0,[=](){
              for(int i = 0; i < 10000; ++i) {
              view->reload();
              SchemeHandler *handler = new SchemeHandler();
              p->installUrlSchemeHandler(QByteArray("help"), handler);
              p->removeUrlSchemeHandler(handler);
              delete handler;
              }
          ;});
          return app.exec();
      }
      

        Attachments

        For Gerrit Dashboard: QTBUG-52509
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            michal Michal Klocek
            Reporter:
            michal Michal Klocek
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes