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

QWebView works in QT4.8, Appears to hang or infinite loop, then crashes, in QT5.0.2 MinGw version

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • 5.0.2
    • 5.0.2
    • WebKit
    • None
    • Windows XP.

    Description

      I have a QWebView that opens a local web page on my computer, and everything works perfectly in Qt4.8. (It also works with a browser). But after porting the software to Qt5.0.2 (and making the change from QWebView to QtWebKitWidgets/QWebView, the program appears to hang, then crashes with the following output:

      QIODevice::read: maxSize argument exceeds QByteArray size limit.
      terminate called after throwing an instance of ‘std::bad_alloc’
      what(): std::bad_alloc

      Here’s the code:

      HelpManager::HelpManager(QObject *parent) :
      QObject(parent)

      { view = new QWebView(); connect (view, SIGNAL(loadStarted()), SLOT(loadIsStarted())); connect (view, SIGNAL(loadProgress(int)), SLOT(loadInProgress(int))); connect (view, SIGNAL(loadFinished(bool)), SLOT(loadIsFinisehd(bool))); view->load(QUrl("../Help/IDTNVMeMgr-web/index.html")); view->setWindowTitle("IDTVMeMgr Help Information"); view->show(); }

      void HelpManager::loadIsStarted()

      { qDebug() << "loadIsStarted"; }

      void HelpManager::loadInProgress(int progress)

      { qDebug() << "loadInProgress, progress =" << progress; }

      void HelpManager::loadIsFinisehd(bool isOk)

      { qDebug() << "loadIsFinshed, status = " << isOk; }

      Here is the successful output using Qt4.8

      loadIsStarted
      loadInProgress, progress = 10
      loadInProgress, progress = 10
      loadInProgress, progress = 27
      loadInProgress, progress = 29
      loadInProgress, progress = 32
      loadInProgress, progress = 36
      loadInProgress, progress = 36
      loadInProgress, progress = 36
      loadInProgress, progress = 90
      loadInProgress, progress = 90
      loadInProgress, progress = 90
      loadInProgress, progress = 90
      loadInProgress, progress = 90
      loadInProgress, progress = 100
      loadIsFinshed, status = true

      Attachments

        1. SmallHelpTest.zip
          472 kB
          Robert Felten
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mibrunin Michael Bruning
            neveralull Robert Felten
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes