-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Bug - iOS (Safari) runaway memory issue when panning while zoomed on single image #952
Comments
This is also an issue when browsing https://openseadragon.github.io/ on an IOS device. If zoomed in to some level, the memory usage spikes and the page reloads because of an error. |
This is unfortunate! I don't know what would be causing it. Are you using a single-tile LegacyTileSource in your actual code? I'd be curious to know if the same issue occurs with the ImageTileSource as well. For that matter, if you have any other kinds of images, like a DZI, that you could try, it would be interesting to know if they all behave the same. I wouldn't think the single-tile LegacyTileSource would be a problem; it should just load that one image (and of course the canvas for drawing) and that should be all the memory allocation necessary. I don't know that much about iOS Safari under the hood, but if you're seeing the memory allocation in QuartzCore, I suppose that implies that it has something to do with graphics processing. Maybe there's something iOS does when scaling an image after a certain point. Hmm, another possibility is that now as of 2.2.0 we do an additional scaling step when we get over 1.1 times the actual pixels. Try using |
Hmm, if it's happening with https://openseadragon.github.io/ I suppose that answers some of my questions...that image is a DZI. Also, the maxZoomPixelRatio is 1.1, the same as smoothTileEdgesMinZoom, which should disable the smoothing. That said, it might still be worth experimenting along some of those lines. |
FWIW, I too can reproduce this on https://openseadragon.github.io/ on both iPhone and iPad with iOS 9.3.2. This must be new behavior as I've certainly zoomed and panned on that page on those devices in the past. It's unclear whether it's a change in iOS or in OSD that caused it. |
I just had a chance to try out an iOS 8.1.2 device - which also crashes. Supposing it's down to an error introduced in OSD at this point. :-) |
Sounds like it! Well, one option would be to go back and try 2.1.0 and see if it's present there. Could even go for a different commits between 2.1.0 and 2.2.0 to isolate when the change happened. |
@iangilman I found the culprit! - 8c4fcc9 - after some This commit turns on when the zoom is greater than Edit: just like you eluded to in your first comment I suppose! |
Beautiful! And you've verified that setting it to Infinity fixes the issue in 2.2.0? Well, probably the thing to do is have OSD forcibly disable that feature on iOS (or maybe all mobile). Would you be up for making a patch for this? |
I can take a stab at this later sure! Thinking the structure is something like disabling the feature from To your question, yes, I've verified setting it to |
Sounds good. Thank you for tracking it down! I look forward to the patch when you can get to it. @MindFreeze FYI, it appears #764 causes problems on iOS; see above. |
I'm experiencing a major memory issue. It only happens when I'm zoomed in to a certain point though, and only on physical iOS devices.
I'd love to hear if anyone's having similar issues or have any ideas as to what might be wrong here. Also ideas to workarounds if it's not feasible to diagnose.
Steps
Setup
Config
Measurements
## Profiling
The
QuartzCore
behaves normally and allocates very little memory each time before suddenly jumping to11.16MiB
several times in the span of a few milliseconds.The text was updated successfully, but these errors were encountered: