question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug - iOS (Safari) runaway memory issue when panning while zoomed on single image

See original GitHub issue

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

  1. Zoom in on the image (far enough, does not happen when only zoomed in… eh… some)
  2. Pan around
  3. Crash

Setup

  • Runs in within a Cordova app
  • iOS 9.3 (same on 3 different test devices)
    • Does not occur on Android
    • Also does not occur when running the same code through the various iOS simulators

Config

OpenSeadragon({
      id: 'seadragon-viewer',
      tileSources: {
        type: 'legacy-image-pyramid',
        levels: [{
          url: 'http://example.com/example.jpeg',
          height: 1938,
          width: 984
        }]
      },
      showNavigationControl: false,
      animationTime: 0.2,
      visibilityRatio: 1.0,
      gestureSettingsTouch: {
        pinchRotate: false,
        flickMomentum: 0,
        dblClickToZoom: false
      },
      maxZoomPixelRatio: 2.0,
      minZoomPixelRatio: 10.0,
      springStiffness: 4.5,
      viewportMargins: {
         left: deviceDimensions.clientWidth * 0.2,
         top: deviceDimensions.clientHeight * 0.1,
         right: deviceDimensions.clientWidth * 0.2,
         bottom: deviceDimensions.clientHeight * 0.1
      }
    })

Measurements

screen shot 2016-06-04 at 11 36 05 ## Profiling screen shot 2016-06-04 at 11 48 58

The QuartzCore behaves normally and allocates very little memory each time before suddenly jumping to 11.16MiB several times in the span of a few milliseconds.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
plougsgaardcommented, Jun 15, 2016

@iangilman I found the culprit! - https://github.com/openseadragon/openseadragon/commit/8c4fcc9ca9289b54f3dd77155ff0b3888a3847e7 - after some git bisect action testing with the overlay.html demo page.

This commit turns on when the zoom is greater than smoothTileEdgesMinZoom, so setting it to Infinity simply turns off that commit.

Edit: just like you eluded to in your first comment I suppose!

0reactions
iangilmancommented, Jun 16, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pinch to zoom in Safari not working consistently on IOS 15
The only workaround I found is to scroll up or down over the image and while it's scrolling pinch to zoom. It works...
Read more >
UIScrollView image/photo viewer with paging enabled and ...
The giveaway is this: zoom in on an image, and pull to the left or right. You will see the next or previous...
Read more >
settings - Monorail
When zooming out the browser makes the page to be displayed believe that it is to be displayed on a desktop-wide screen. Therefore...
Read more >
My files are not opening – Figma Help Center
When your File reaches the active memory limit we will display an error message on screen. Learn more about managing and improving memory...
Read more >
Safari has a problem displaying certain images - Ask Different
When it should display the whole picture all I get is black or white box. It can be clicked to zoom in though....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found