[Webkit-unassigned] [Bug 29594] New: [Qt] Crash - webkit native object segmentation fault

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 21 09:01:07 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29594

           Summary: [Qt] Crash - webkit native object segmentation fault
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Mac OS X 10.5
            Status: NEW
          Keywords: Qt
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: vestbo at webkit.org


This bug report originated from Nokia internal issue QT-647

--- Description ---

The actual code gets a segfault by implicit deletions occurring within the
application and when exiting the application.  This would be a much more
complex exercise to create some code to simulate this.  This small example only
exercises explicitly deleting a webviewer with no QApplications being created.

 #include <QtGui>

class WebPage : public QWebPage {
public:
    WebPage(QObject *parent = 0) : QWebPage(parent) {
    }

protected:
    QObject* createPlugin(const QString &classid, const QUrl &url, const
QStringList &paramNames, const QStringList &paramValues) {
        QPushButton *b = new QPushButton("Press me!");
        return b;
    }
};

int main(int argc, char *argv[]) {
    QApplication app(argc, argv);

    QStringList args = app.arguments();
    QString fileName = "index.html";

    if(args.count() > 1)
        fileName = args[1];

    QWebSettings *settings = QWebSettings::globalSettings();
    settings->setAttribute(QWebSettings::PluginsEnabled, true);

    QWebView *view = new QWebView;
    WebPage *page = new WebPage;
    QFile file(fileName);
    QFileInfo info(file);


page->mainFrame()->load(QUrl::fromLocalFile(info.absoluteFilePath()));

    view->setPage(page);
    view->resize(400, 400);
    view->show();
    view->deleteLater();

    return app.exec();
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list