Ticket #669 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Firefox SVG does not support full range of values

Reported by: crschmidt Owned by:
Priority: blocker Milestone: 2.4 Release
Component: general Version:
Keywords: Cc:
State:

Description

Firefox SVG does not support drawing points with values more than something between 10,000 and 40,000. (It's hard to tell, since it crashes the browser when you try.) The resulting behavior is that the browser crashes.

I observed this behavior on OS X, and it has been reported many times by other users, though never fully fixed.

To reproduce:

The browser will usually lock up.

Partial patch incoming

Attachments

svg.js.patch Download (8.6 KB) - added by crschmidt 6 years ago.

Change History

Changed 6 years ago by crschmidt

Changed 6 years ago by crschmidt

  • keywords review added

Okay, this one's a big one. Don't push out the RC without it. Please review.

Changed 6 years ago by sderle

This patch looks pretty good, except for this stuff

  if (!component) { draw = false; } 

I'm concerned about the fact that if any component is "undrawable" from the perspective of this patch, then no part of the feature gets drawn at all. Why not draw at least the parts of the feature that are drawable? Or is that a can of worms not worth opening?

Also, when the map gets panned outside the maxPixel region (parenthetically I have doubts about the label 'maxPixel' and wonder if it shouldn't be 'maxPixelValue' or some such) shouldn't the layer re-locate itself so that it *can* continue drawing features?

FWIW I don't see any of these as blockers. If these changes are too much of a PITA to fix, please add some tickets to 2.5 for further consideration, and I'll approve the patch.

Changed 6 years ago by crschmidt

The problem is that we don't know what part of the feature we can/can't draw. If this were a well defined limitation in the SVG spec or something like that, it's possible that we could find that boundary and exploit it more closely. As it is, this solution is designed to just make the damn browser not crash :)

Imagine a triangle from Hawaii to Moscow to the Philippines. I zoom very far into Africa. Now, you've got to place a box over that Triangle, and cut the edges off on that box. Worst case scenario, you've got (I think) to come up with the 6 points on which that box intersects those points. It might be possible, but far from trivial -- certainly not something I know how to do. Even if I'm zoomed into the Philippines, I still need to come up with 3 extra points where the box intersects.

In reality, these concerns are pretty small: I have to get to the point where a single feature covers a viewport 6 times as large as my current one before it's a problem.

Because the renderer doesn't keep a list of geometries, it's not possible to have a 'redraw': without that list, we can't get the original geometries back. It's something we can definitely add in the next release. I've opened #670 for that.

Changed 6 years ago by sderle

  • keywords commit added; review removed

ok, understood. please apply the patch!

Changed 6 years ago by crschmidt

  • keywords pullup added; commit removed

Changed 6 years ago by crschmidt

  • keywords pullup removed
  • status changed from new to closed
  • resolution set to fixed

Brought up to 2.4 branch for RC2 with r3088

Note: See TracTickets for help on using tickets.