Skip to content

iOS Canvas memory exceeds the maximum limit when moving colorbar thresholds #1510

@Farkal

Description

@Farkal

Describe the bug
If you move the colorbar thresholds of a layer on an iOS device you will create lot of canvas and raise the maximum limit of the device (limit that just change with the new webkit release -> WebKit/WebKit@5d5b478#diff-b411cd4839e4bbc17b00570536abfa8f )

To Reproduce
Steps to reproduce the behavior:

  1. Open the website
  2. Add Cloud Top Height (Day)
  3. Open Settings of the layer
  4. Move threshold
  5. Open safari debug console
  6. Go to the Canvas tab
  7. Move threshold
  8. See the canvas memory use exceeds the maximum limit error (if you have lot of ram it can take some time but on iPad it come fast (the limit is 256MB)
  9. From this moment safari don't want to allow you to create more canvas, openlayers loose references everything crash

Expected behavior
No error message and no crash

Desktop (please complete the following information):

  • OS: Mac, IPad,
  • Browser safari
  • Version 12

Additional context
The problem comes from https://github.com/nasa-gibs/worldview/blob/360c06322c909164ec1fca117c896c1a053cf700/web/js/ol/lookupimagetile.js
Each time the colormap change a new canvas is created and also a new context.
I use the same function to filter my data with openlayers because the postcompose don't work for me so if you find a way to resolve this i would be very grateful !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions