Skip to content

Unable to use Rive #766

@grybouilli

Description

@grybouilli

Bug description

Cog is unable to render a page that contains Rive canvas. It crashes on loading them.

Environment

HW : Raspberry Pi 3b+
OS : Yocto built image following meta-webkit RPi guidelines

Built from source

Libwpe-1.16.2
wpebackend-fdo-1.14.4
wpewebkit-2.46.7
Cog (git master or 0.18)

To reproduce

Rive web example in a file example.html:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Rive Hello World</title>
  </head>
  <body>
    <canvas id="canvas" width="500" height="500"></canvas>

    <script src="https://unpkg.com/@rive-app/canvas"></script>
    <script>
      const r = new rive.Rive({
        src: "https://cdn.rive.app/animations/vehicles.riv",
        canvas: document.getElementById("canvas"),
        autoplay: true,
        // artboard: "Arboard", // Optional. If not supplied the default is selected
        stateMachines: "bumpy",
        onLoad: () => {
          // Ensure the drawing surface matches the canvas size and device pixel ratio
          r.resizeDrawingSurfaceToCanvas();
        },
      });
    </script>
  </body>
</html>

Launch command:
cog --platform drm example.html

Environment variables:

USER=root
SYSTEMD_PAGER=
LIBGL_DEBUG=verbose
SHLVL=1
HOME=/root
COG_PLATFORM_DRM_CURSOR=1
EGL_LOG_LEVEL=debug
SSH_TTY=/dev/pts/0
PS1=\u@\h:\w\$ 
LOGNAME=root
TERM=xterm-256color
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
LANG=C
SHELL=/bin/sh
MESA_DEBUG=1
PWD=/root
SSH_CONNECTION=::ffff:10.42.0.1 36882 ::ffff:10.42.0.194 22
EDITOR=vi

Some logs:

Mesa: error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_VERTEX_UNIFORM_COMPONENTS)
libEGL debug: EGL user error 0x3009 (EGL_BAD_MATCH) in eglCreateContext: dri2_create_context

libEGL debug: EGL user error 0x3009 (EGL_BAD_MATCH) in eglCreateContext: dri2_create_context

libEGL debug: EGL user error 0x3009 (EGL_BAD_MATCH) in eglCreateContext: dri2_create_context

Mesa: error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_VERTEX_UNIFORM_COMPONENTS)
Cog-Core-Message: 13:24:27.030: <file:///root/example.html> Loaded successfully.

(cog:7391): Cog-Core-WARNING **: 13:24:27.675: <file:///root/example.html> Crash!: The renderer process crashed. Reloading the page may fix intermittent failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions