QWebView中的另一次崩溃

时间:2016-02-19 13:50:15

标签: qt qwebview

我在使用QWebView(Qt5.4)时遇到了另一个错误。我的应用程序非常简单,由一个主窗口构成,我的WebView是中央窗口小部件。在视图中,用户首先登录,然后出现一个页面,其中有3个选项卡,如下所示:

tabs

我可以使用Webkit Bridge检索我的对象的信息,但如果我点击任何其他选项卡,应用程序崩溃。这是输出:

ASSERTION FAILED: !m_dirty
platform\graphics\GraphicsLayerTransform.cpp(83) : WebCore::GraphicsLayerTransform::combined

和callstack:

  

Qt5WebKitd.dll!WTFCrash()Ligne 345 C ++       Qt5WebKitd.dll!WebCore :: GraphicsLayerTransform :: combined()Ligne 84 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: computeOverlapRegions(WebCore :: Region& overlapRegion,WebCore :: Region& nonOverlapRegion,WebCore :: TextureMapperLayer :: ResolveSelfOverlapMode模式)Ligne 293 + 0x23八位字节C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: computeOverlapRegions(WebCore :: Region& overlapRegion,WebCore :: Region& nonOverlapRegion,WebCore :: TextureMapperLayer :: ResolveSelfOverlapMode模式)Ligne 310 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintUsingOverlapRegions(const WebCore :: TextureMapperPaintOptions& options)Ligne 333 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintRecursive(const WebCore :: TextureMapperPaintOptions& options)Ligne 460 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildren(const WebCore :: TextureMapperPaintOptions& options)Ligne 191 + 0x20八位字节C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildrenWithReplica(const WebCore :: TextureMapperPaintOptions& options)Ligne 232 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintRecursive(const WebCore :: TextureMapperPaintOptions& options)Ligne 456 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildren(const WebCore :: TextureMapperPaintOptions& options)Ligne 191 + 0x20八位字节C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildrenWithReplica(const WebCore :: TextureMapperPaintOptions& options)Ligne 232 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintRecursive(const WebCore :: TextureMapperPaintOptions& options)Ligne 456 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildren(const WebCore :: TextureMapperPaintOptions& options)Ligne 191 + 0x20八位字节C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildrenWithReplica(const WebCore :: TextureMapperPaintOptions& options)Ligne 232 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintRecursive(const WebCore :: TextureMapperPaintOptions& options)Ligne 456 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildren(const WebCore :: TextureMapperPaintOptions& options)Ligne 191 + 0x20八位字节C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildrenWithReplica(const WebCore :: TextureMapperPaintOptions& options)Ligne 232 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintRecursive(const WebCore :: TextureMapperPaintOptions& options)Ligne 456 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildren(const WebCore :: TextureMapperPaintOptions& options)Ligne 191 + 0x20八位字节C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildrenWithReplica(const WebCore :: TextureMapperPaintOptions& options)Ligne 232 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintRecursive(const WebCore :: TextureMapperPaintOptions& options)Ligne 456 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildren(const WebCore :: TextureMapperPaintOptions& options)Ligne 191 + 0x20八位字节C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintSelfAndChildrenWithReplica(const WebCore :: TextureMapperPaintOptions& options)Ligne 232 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paintRecursive(const WebCore :: TextureMapperPaintOptions& options)Ligne 456 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayer :: paint()Ligne 93 C ++       Qt5WebKitd.dll!WebCore :: TextureMapperLayerClientQt :: renderCompositedLayers(WebCore :: GraphicsContext * context,const WebCore :: IntRect& clip)Ligne 141 C ++       Qt5WebKitd.dll!QWebFrameAdapter :: renderCompositedLayers(WebCore :: GraphicsContext * context,const WebCore :: IntRect& clip)Ligne 448 C ++       Qt5WebKitd.dll!QWebFrameAdapter :: renderRelativeCoords(QPainter * painter,int layers,const QRegion& clip)Ligne 545 C ++       Qt5WebKitWidgetsd.dll!QWebFrame :: render(QPainter * painter,QFlags layer,const QRegion& clip)Ligne 644 + 0x1d八位字节C ++       Qt5WebKitWidgetsd.dll!QWebFrame :: render(QPainter * painter,const QRegion& clip)Ligne 655 C ++       Qt5WebKitWidgetsd.dll!QWebView :: paintEvent(QPaintEvent * ev)Ligne 835 C ++       Qt5Widgetsd.dll!QWidget :: event(QEvent * event)Ligne 8810 C ++       Qt5WebKitWidgetsd.dll!QWebView :: event(QEvent * e)Ligne 734 C ++       Qt5Widgetsd.dll!QApplicationPrivate :: notify_helper(QObject * receiver,QEvent * e)Ligne 3720 + 0x11八位字节C ++       Qt5Widgetsd.dll!QApplication :: notify(QObject * receiver,QEvent * e)Ligne 3685 + 0x10八位字节C ++       Qt5Cored.dll!QCoreApplication :: notifyInternal(QObject * receiver,QEvent * event)Ligne 935 + 0x15八位字节C ++       Qt5Cored.dll!QCoreApplication :: sendSpontaneousEvent(QObject * receiver,QEvent * event)Ligne 231 + 0x38八位字节C ++

有人知道如何解决这次崩溃吗?

如果需要,请输入我的代码:

MyObject::MyObject(QWidget *parent)
    : QMainWindow(parent)
{
    m_pView = new QWebView(this);
    m_pView->settings()->setAttribute(QWebSettings::JavascriptEnabled, true);
    m_pView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);


    connect(m_pView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(addJSObject()));  

    m_pView->load(QUrl("file:///D:/DEV/Resources/index.html"));

    setCentralWidget(m_pView);
}

void MyObject::addJSObject()
{    
    m_pView->page()->mainFrame()->addToJavaScriptWindowObject(QString("MyObject"), this);
}

0 个答案:

没有答案
相关问题