Qt World Summit: Register Today!

Program crashes when using QWebView to show a web page

  • Hi all,
    I encountered a weird problem, my program crashes when using QWebView to show a web page, but it works well when show YouTube.

    Any suggestion is appreciated, either is it some incorrect data in this website, or is my setting incorrect.

    My env is Windows 8.1 64-bit, Qt 5.1.0, Visual Studio 2010 professional, NPSWF32_12_0_0_77.dll.

    Here is the code:
    #include <QApplication>
    #include <QtWebKitWidgets/QWebView>

    int main(int argc, char * argv[])
    QApplication app(argc, argv);
    QWebView view;
    QStringList libs = QCoreApplication::libraryPaths();
    view.settings()->setAttribute(QWebSettings::PluginsEnabled, true);
    // crash
    // OK
    return app.exec();

    From call stack, it crashes in NPSWF32_12_0_0_77.dll when try to free a buffer, error message is following:

    @Unhandled exception at 0x05460558 in q5.exe: 0xC0000005: Access violation reading location 0xcdcdcdcd.@

    and call stack is :
    @ NPSWF32_12_0_0_77.dll!05460558()
    [Frames below may be incorrect and/or missing, no symbols loaded for NPSWF32_12_0_0_77.dll]

Log in to reply