Bug 100758 - [Qt][WK2] QQuickWebView tests crash on rendering in xvfb
Summary: [Qt][WK2] QQuickWebView tests crash on rendering in xvfb
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 70236 76773
  Show dependency treegraph
Reported: 2012-10-30 07:26 PDT by Balazs Kelemen
Modified: 2012-10-30 12:12 PDT (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2012-10-30 07:26:05 PDT
Here is my reducted test case (added to tst_qquickwebview.cpp)

void tst_QQuickWebView::showBasic()
    QSizeF s(300, 400);
    m_window->setGeometry(0, 0, s.width(), s.height());
    webView()->setUrl(QUrl::fromLocalFile(QLatin1String(TESTS_SOURCE_DIR "/html/basic_page.html")));

It is flakily producing a crash under GraphicsContext3D::mappedSymbolName, because at
ShaderSourceMap::iterator result = m_shaderSourceMap.find(shaders[i]);  the shader is 0 (empty key value).

The reason is that glGetAttachedShaders could not lookup the second shader.
Here is the output of the reducted test (after added a check for GLerror() with printf and exit):

PASS   : tst_QQuickWebView::initTestCase()
QWARN  : tst_QQuickWebView::showBasic() QOpenGLShader::compile(Vertex): failed
QWARN  : tst_QQuickWebView::showBasic() QOpenGLShader::compile(Fragment): failed
QWARN  : tst_QQuickWebView::showBasic() QSGMaterialShader: Shader compilation failed:
QWARN  : tst_QQuickWebView::showBasic() "" 
QWARN  : tst_QQuickWebView::showBasic() QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked 
QWARN  : tst_QQuickWebView::showBasic() QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked 

So, it's clear that we should not ignore those warnings from Qt, and find out how could be compatible with xvfb. If it's not possible than we would have to dedicate a machine for API tests.
Comment 1 Balazs Kelemen 2012-10-30 07:28:44 PDT
Ossy said these tests runs fine in his local environment (in xvfb), so it's affected by my environment (GPU I guess).
Comment 2 Balazs Kelemen 2012-10-30 12:12:00 PDT
Seems like for some reason compilation of the most simple shader program is failing in my env in xvfb (not tried in a separate program but Qt is failing with the QSGFlatColorMaterial). I think the difference between the bot and my env is that here it use the nvidia gl lib and not mesa. I'm not sure whether the nvidia implementation or Qt is incompatible with xvfb, but the consequence seems to be that we should not try to run tests (or anything) in xvfb if Qt was built against a vendor GL implementation (and not mesa). Since bots are ok, and developers don't have to use xvfb we can live with that.