Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtWebEngineWidgets example crash report



  • Here is my setup and experience in trying to launch demobrowser ..

    Qt 5.6.0 installed from PPA repo on 32bit Ubuntu 14.04.
    Installation directory /opt/qt56/

    I'm interested in examples of QtWebEngine and QtWebEngineWidgets.

    In Qt 5.6 Creator Welcome > Examples page I only see two examples listed.

    • Context2D Example
    • Default Prototypes Example

    I don't know why there are only two examples shown. In Qt 5.5.1 (now uninstalled) there were many more examples to browse through.

    So I used Open Project to navigate to /opt/qt56/examples folder.
    I selected /webenginewidgets/demobrowser/demobrowser

    Messages seen:-

    • No .user settings file created by this instance of Qt Creator was found.

    • Do you still want to load the settings file "/opt/qt56/examples/webenginewidgets/demobrowser/demobrowser.pro.user"?

    • Cannot overwrite file /opt/qt56/examples/webenginewidgets/demobrowser/demobrowser.pro.user: Permission denied

    On finally running the demobrowser application a brief glimpse of demobrowser running in Qt widget is seen .. followed by an immediate crash.

    QFactoryLoader::QFactoryLoader() checking directory path "/opt/qt56/examples/webenginewidgets/demobrowser/accessiblebridge" ...
    loaded library "/opt/qt56/plugins/iconengines/libqsvgicon.so"
    js: Font from origin 'http://d3hp9ud7yvwzy0.cloudfront.net' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.qt.io' is therefore not allowed access.
    js: Font from origin 'http://d3hp9ud7yvwzy0.cloudfront.net' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.qt.io' is therefore not allowed access.
    nouveau: kernel rejected pushbuf: No such file or directory
    ...
    and a long stream of references to nouveau
    ending with
    ...

    The program has unexpectedly finished.
    /opt/qt56/examples/webenginewidgets/demobrowser/demobrowser crashed

    ...

    Any advice to follow to overcome this apparent security problem in demobrowser?

    • No 'Access-Control-Allow-Origin' header is present on the requested resource

    I've found this to read through. http://www.sitepoint.com/working-around-origin-policy/

    ..........................

    [later edit]

    This is an update.
    I cloned the demobrowser example into a local folder so that I can work on it.
    Changed ownership to user instead of root.
    Searched through the example for url http://qt.io
    browsermainwindow.cpp

    Line Number: 91
    const char *BrowserMainWindow::defaultHome = "http://qt.io/";

    Changed to http://localhost/

    Ran the example again and I saw apache2 welcome page.
    But the application still crashed with this final line in Application Output ..

    demobrowser: ../../nouveau/pushbuf.c:726: nouveau_pushbuf_data: Assertion `kref' failed.
    The program has unexpectedly finished.
    /home/username/Qt_Creator_Projects/demobrowser/demobrowser crashed

    Tracked the reference to nouveau failure to this bug report ..

    https://bugreports.qt.io/browse/QTBUG-41242

    https://bugs.freedesktop.org/show_bug.cgi?id=91632

    But I still don't know to solve this.



  • I have taken a small step forward in gathering clues.
    I researched the nouveau: kernel rejected pushbuf:
    clue and hit on this thread.

    https://lists.freedesktop.org/archives/nouveau/2015-August/022013.html

    which refers to QtWebEngine bug.

    I read this ..
    "One interesting thing I discovered was that using the EGL/GLES mode instead of
    GLX/GL solved the issue. I assume at your level it shouldn't be that different.
    So it could be a difference in how EGL vs GLX acts".

    So I explored EGL/GLES mode (although I am totally in the dark about this subject) and read this ..

    http://keyj.emphy.de/files/linuxgraphics_en.pdf

    Then using Synaptic Package Manager in Ubuntu I inspected installed packages (searching "EGL") and noticed that libwayland-egl1-mesa-lts-trusty
    was not enabled.

    So as a long shot I installed this package and rebooted.

    Now returning to Qt 5.6 Creator and relaunching demobrowser .. this time the browser stays open and does not crash. Previously it crashed immediately after Run.

    Application Output does not report any nouveau errors.

    However .. when I started scrolling the localhost webpage the nouveau crash report returns ..

    nouveau: kernel rejected pushbuf: No such file or directory
    nouveau: ch0: krec 0 pushes 0 bufs 1 relocs 0
    nouveau: ch0: buf 00000000 00000002 00000004 00000004 00000000
    demobrowser: ../../nouveau/pushbuf.c:726: nouveau_pushbuf_data: Assertion `kref' failed.
    The program has unexpectedly finished.
    /home/username/Qt_Creator_Projects/_Qt560_examples/demobrowser/demobrowser crashed

    Is this a known QtWebEngine bug? Or am I trying to run Qt 5.6.0 on too old a platform (Dell 1720 Inspiron laptop)? QtWebKit worked fine in earlier Qt 5.5.1 installation.



  • My testing position now.

    I can run nanobrowser (but must change URL to localhost to avoid crash due to security policy .. If qt.io is left as default URL I see .. No 'Access-Control-Allow-Origin' header).
    Nanobrowser does not crash when I move around the browser page.

    I can run demobrowser to the point where a localhost page is shown (as above). But it crashes when I navigate the screen. The crash report always ends with ...
    demobrowser: ../../nouveau/pushbuf.c:726: nouveau_pushbuf_data: Assertion `kref' failed.

    I've played around with egl drivers and mesa but to no avail.

    I'll have to use basic nanobrowser until I understand exactly why demobrowser crashes.

    [Later edit]

    I'm adding this note some days after posting.

    I've solved my problem by switching NVIDIA driver to NVIDIA proprietary, tested.
    My previous driver was nouveau open source and clearly there was a conflict with Chrome web browsing .

    The NVIDIA drivers are seen at Ubuntu Software Centre > Edit > Software Sources > Additional Drivers.

    I was using X.Org X server - Nouveau display driver from xserver-xorg-video-nouveau (open source). I switched to proprietary, tested.



  • Thanks. I had the same issue but I did not have enough time to investigate. So I will try to update graphics driver as you did.


Log in to reply