Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Qt warning in tests: QXcbIntegration #1819

Closed
lahwaacz opened this issue Aug 9, 2016 · 13 comments
Closed

Unexpected Qt warning in tests: QXcbIntegration #1819

lahwaacz opened this issue Aug 9, 2016 · 13 comments
Labels
component: tests Issues related to the testsuite. priority: 2 - low Issues which are currently not very important.

Comments

@lahwaacz
Copy link
Contributor

lahwaacz commented Aug 9, 2016

I just got this error when running tox -e py35 on Arch with latest Nvidia drivers:

____________________________________________________________________________ ERROR at teardown of test_searching_text ____________________________________________________________________________

quteproc_process = <end2end.fixtures.quteprocess.QuteProc object at 0x7f5d2f8f7048>, httpbin = <end2end.fixtures.webserver.WebserverProcess object at 0x7f5d3cd399d8>
request = <SubRequest 'quteproc' for <Function 'test_searching_text'>>

    @pytest.yield_fixture
    def quteproc(quteproc_process, httpbin, request):
        """Per-test qutebrowser fixture which uses the per-file process."""
        request.node._quteproc_log = quteproc_process.captured_log
        quteproc_process.before_test()
        yield quteproc_process
>       quteproc_process.after_test(did_fail=request.node.rep_call.failed)
E       Failed: Logged unexpected errors:
E       
E       15:23:09 WARNING  qt         Unknown module:none:0 QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

tests/end2end/fixtures/quteprocess.py:609: Failed

(It was on my custom branch with some modifications to hints, but I don't think that it would make any difference here.)

@The-Compiler
Copy link
Member

I think @haasn told me about the same recently, I've never seen it myself.

If you add "QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled" to qt_log_ignore in pytest.ini and do a full test run, do they all pass?

@lahwaacz
Copy link
Contributor Author

lahwaacz commented Aug 9, 2016

Unfortunately, no. I'm getting a segfault now:

tests/unit/browser/test_tab.py .F

____________________________________________________________________________________ test_tab[WebEngineView] _____________________________________________________________________________________
tests/unit/browser/test_tab.py:94: Failure: Qt messages with level WARNING or above emitted
-------------------------------------------------------------------------------------- Captured Qt messages --------------------------------------------------------------------------------------
None:None:0:
    QtWarningMsg: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled (IGNORED)
None:None:0:
    QtWarningMsg: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled (IGNORED)
None:None:0:
    QtWarningMsg: QOpenGLWidget: Failed to create context
None:None:0:
    QtWarningMsg: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled (IGNORED)
None:None:0:
    QtWarningMsg: QOpenGLWidget: Failed to create context
None:None:0:
    QtWarningMsg: composeAndFlush: makeCurrent() failed
None:None:0:
    QtWarningMsg: composeAndFlush: makeCurrent() failed
-------------------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------------------
[0809/155516:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.
Xlib:  extension "GLX" missing on display ":3".
[0809/155516:ERROR:gl_surface_qt.cpp(187)] GLContextHelper::getXConfig() failed.
--------------------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------------------
objreg.py                  118 DEBUG    schedule removal: 0
objreg.py                  118 DEBUG    schedule removal: tab

tests/unit/browser/test_tab.py ...Fatal Python error: Segmentation fault

Thread 0x00007fec98ddf400 (most recent call first):
  File "/home/lahwaacz/Bbox/pg/python3/qutebrowser/.tox/py35/lib/python3.5/site-packages/pytestqt/exceptions.py", line 40 in start
  File "/home/lahwaacz/Bbox/pg/python3/qutebrowser/.tox/py35/lib/python3.5/site-packages/pytestqt/plugin.py", line 107 in pytest_runtest_setup
ERROR: InvocationError: '/home/lahwaacz/Bbox/pg/python3/qutebrowser/.tox/py35/bin/python scripts/dev/run_pytest.py tests'
____________________________________________________________________________________________ summary _____________________________________________________________________________________________
ERROR:   py35: commands failed

@The-Compiler
Copy link
Member

Hmm. Does qutebrowser --temp-basedir --backend webengine work for you though? Do you have Xvfb installed?

@lahwaacz
Copy link
Contributor Author

lahwaacz commented Aug 9, 2016

As far as I can tell, webengine works fine. And yes, xorg-server-xvfb 1.18.4-1 is installed.

@The-Compiler
Copy link
Member

Can you try if the tests work with --no-xvfb (which will make windows pop up instead) please?

@The-Compiler
Copy link
Member

Some more ideas, if that works: What does xvfb-run glxinfo say? Do you have mesa-libgl installed? If not, does installing that help?

@lahwaacz
Copy link
Contributor Author

lahwaacz commented Aug 9, 2016

All tests pass with --no-xvfb. Running xvfb-run glxinfo gives

name of display: :99
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Error: couldn't find RGB GLX visual or fbconfig
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".

Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".
Xlib:  extension "GLX" missing on display ":99".

I don't have mesa-libgl installed, it conflicts with nvidia-libgl which I have installed (version 367.35-1).

@The-Compiler
Copy link
Member

Seems like you're not the only one with that issue... I guess you could unpack mesa-libgl into some directory and set LD_LIBRARY_PATH or LD_PRELOAD accordingly (see man ld)... Not sure if it's worth the trouble.

I guess I could detect if OpenGL is available and skip QtWebEngine tests if not... Does this print False for you?

xvfb-run -s '-screen 0 800x600x16' python3 -c "from PyQt5.QtWidgets import QApplication; from PyQt5.QtGui import QOpenGLContext; app = QApplication([]); print(QOpenGLContext().create())"

If not, how about this?

xvfb-run -s '-screen 0 800x600x16' python3 -c "from PyQt5.QtWidgets import QApplication, QOpenGLWidget; app = QApplication([]); w = QOpenGLWidget(); w.show(); print(w.isValid())"

@lahwaacz
Copy link
Contributor Author

lahwaacz commented Aug 9, 2016

Yes, the detection gives False even in the first case.

@The-Compiler The-Compiler added component: tests Issues related to the testsuite. priority: 2 - low Issues which are currently not very important. labels Aug 9, 2016
@lahwaacz
Copy link
Contributor Author

lahwaacz commented Aug 9, 2016

FWIW, the new warning (QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled) also talks about OpenGL and it happens even outside the QtWebEngine tests, so hiding it might actually only delay other issues.

@The-Compiler
Copy link
Member

I don't really have a good solution for this then... I guess people with nvidia drivers will just need to either mess with mesa-libgl somehow, or use --no-xvfb, or rely on Travis... Sorry!

@The-Compiler
Copy link
Member

I just saw this change in the Qt gerrit: Disable GPU when no shared OpenGL context is available - I guess that'd help?

@lahwaacz
Copy link
Contributor Author

Maybe... I won't be able to build Qt myself to test that though, so I guess we'll see in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tests Issues related to the testsuite. priority: 2 - low Issues which are currently not very important.
Projects
None yet
Development

No branches or pull requests

2 participants