Plotly.js: Fast scroll zoom results in out of memory error

Created on 7 Mar 2019  路  4Comments  路  Source: plotly/plotly.js

See https://codepen.io/arnog/pen/YgZdEZ

  1. Create a heatmap plot with about 500 x 500 elements
  2. Configure the plot with scrollZoom = true and zsmooth = 'fast'
  3. Use the mouse wheel to zoom in rapidly into the plot

Result:

  • the plot is not zoomed in and the console displays "Uncaught RangeError: Invalid array length"

The array being created is the pixel array in which to draw the interpolated heatmap at traces/heatmap/plot.js:238

The problem seems to be that imageWidth and imageHeight are used here and later in the function, perhaps instead of canvasW and canvasH.

bug

All 4 comments

@arnog I could not replicate the particular error message you received. What operating system and web browser were you using?

@archmoj Can you reproduce this issue?

While investigating the issue reported by @arnog, I uncovered the following bug in heatmapgl: https://github.com/plotly/plotly.js/issues/3624

I managed to crash the browser tab zooming in on this plot. It got slower and slower as I zoomed in, eventually crashing. But I also see a bug when you zoom out, an increasingly small fraction of the total trace is shown.
heatmap scroll sm
Mac OS 10.14, Chrome 72.

I could reproduce the issue as well. When zooming in, the memory usage skyrockets from ~200M to a whopping 1500M.

NixOS 18.09, Chromium 69

Thanks @arnog

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chriddyp picture chriddyp  路  3Comments

nicolaskruchten picture nicolaskruchten  路  3Comments

mithi picture mithi  路  3Comments

deecay picture deecay  路  3Comments

empet picture empet  路  3Comments