putImageData crashes browser

116 Views Asked by At

The putImageData at the end of this code crashes the "Web" browser in Raspberry Pi.

    var plotCanvas = document.getElementById("plotCanvas");
    var plotCanvasWidth = plotCanvas.offsetWidth;
    var plotCanvasHeight = plotCanvas.offsetHeight;
    plotCanvasCtx = plotCanvas.getContext("2d");
    var prevImageData = plotCanvasCtx.getImageData(1, 0, plotCanvasWidth -1, plotCanvasHeight);
    plotCanvasCtx.putImageData(prevImageData, 0, 0);

It works fine in Windows: FireFox, Chrome, Opera, Internet Explorer.

It doesn't work in Raspberry Pi:

  • Web (Epiphany): putImageData crashes the app
  • Midori: hangs up at start-up
  • Dillo: no JavaScript
  • Chromium: can't install

Additional info:

  • canvas is 750 x 350 (touchscreen is 800 x 480)
  • Raspi version: Raspian GNU/Linux 8 (jessie)

The console says:

epiphany-browser: ../../../../src/cairo-surface.c:1626: cairo_surface_mark_dirty_rectangle: Assertion `! _cairo_surface_has_snapshots (surface)' failed. Aborted

0

There are 0 best solutions below