Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Farkal opened this issue Nov 19, 2018 · 6 comments
Open
Labels
Projects

Comments

@Farkal
Copy link

Farkal commented Nov 19, 2018

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 !

@mike-mcgann mike-mcgann self-assigned this Nov 20, 2018
@mike-mcgann mike-mcgann added the investigate Someone must examine and confirm that this is a valid issue label Nov 20, 2018
@mike-mcgann
Copy link
Collaborator

Thanks for the report. I'll take a look at it next week.

@mike-mcgann
Copy link
Collaborator

I am able to reproduce this bug.

@mike-mcgann mike-mcgann added bug and removed investigate Someone must examine and confirm that this is a valid issue labels Nov 30, 2018
@minniewong minniewong added this to the January Release milestone Dec 3, 2018
@minniewong
Copy link
Contributor

Waiting on access to ipad

@minniewong minniewong removed this from the February Release milestone Jan 2, 2019
@minniewong minniewong added this to Backlog in Worldview Apr 24, 2019
@minniewong minniewong added the investigate Someone must examine and confirm that this is a valid issue label Feb 4, 2020
@jasontk19 jasontk19 removed the investigate Someone must examine and confirm that this is a valid issue label Mar 19, 2020
@jasontk19 jasontk19 removed their assignment Mar 19, 2020
@jasontk19
Copy link
Collaborator

Tested this with an iPad Air 2 with iOS 13.3.1 and did not see the app crash in either Safari or Chrome with multiple layers visible that had adjusted palette thresholds. The app did become noticeably sluggish when adjusting thresholds though so I suspect the same issue exists but newer devices are able to keep up without crashing to a certain point (i.e. the iPad Air 2 has 2GB RAM).

@Farkal
Copy link
Author

Farkal commented Mar 21, 2020

Yeah that's it, the more machine have RAM the more time you have before crash. But it still happen :/

@jasontk19 jasontk19 self-assigned this Jun 1, 2020
@jasontk19
Copy link
Collaborator

@nasa-gibs/worldview This may be worth fixing as this could be a noticeable memory consumption issue on desktop machines as well. Panning around the app for a few minutes with a custom palette (adjusted thresholds) enabled caused my Chrome tab to fairly quickly reach 1GB of usages while similar usage without custom palettes left it hovering pretty stably around ~470MB.

If a user had custom palettes enabled and left their tab open, continually using the app or task switching back to it throughout the day, this could conceivably cause their tab to freeze or crash eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Worldview
  
Backlog
Development

No branches or pull requests

5 participants