Leaflet / Leaflet.markercluster

Marker Clustering plugin for Leaflet
MIT License
3.98k stars 1k forks source link

Freeze on chrome 24.0.1312.52 #118

Closed apavillet closed 11 years ago

apavillet commented 11 years ago

Capture d e cran 2013-01-16 a 18 22 49 I'm experiencing some freezes since i updated chrome to 24.0.1312.52, the whole page freezes for seconds.
Hello i think this if related because when i disable marker cluster the page does not freeze anymore.

Did anyone had the same issue ?

Attached is the image of the state the page stays in for a few seconds. Thanks

danzel commented 11 years ago

Is your browser totally locked up when this happens?

Does it reproduce on http://leaflet.github.com/Leaflet.markercluster/example/marker-clustering-realworld.10000.html I'm on chrome 24 and it doesn't happen anywhere for me.

A simplified testcase on jsfiddle would be very helpful tracking this down, thanks!

apavillet commented 11 years ago

Hello,

As of today i can't reproduce that even if my code hasn't changed at all. Sorry for the trouble and thanks for the work, I think this can be closed.

jeroen commented 11 years ago

I am having very weird issues on chrome 24 as well. Seems to happen in case of many markers. Didn't happen on Chrome 23 or other browsers. It happens for me when the layer with markers is added to the map.

I think it might be a stack overflow... maybe something in chrome settings changed.

If there is a layer with a lot of markers. Say, 3000. When the layer with markers is added to the map, e.g:

map.addLayer(markers);

Does this result in a recursive stack of 3000 function calls? Or is it implemented as a loop?

danzel commented 11 years ago

so you have something like this: ?

var m = new L.MarkerClusterGroup();
for (var i =0; i < 3000; i++) {
m.addLayer(new L.Marker(...));
}
map.addLayer(m);

A jsfiddle to reproduce this would be very useful.

It definitely doesn't recurse 3000 times down the stack :-)

jeroen commented 11 years ago

I'm having a very hard time narrowing this down. But you can reproduce it using my application:

http://jeroenooms.github.com/snack/devel.html

You need to go the top-right corner, and press 'markers'. The weird thing is that, sometimes it works fine, and sometimes it results in an error. If you don't seen an error, click the word 'markers' again. I can only produce this problem in chrome 24. Chrome 23 seems unaffected.

When you do reproduce the problem, the next challenge is making sense of my code :-) The chrome error stack trace should lead you to a function named renderMarkers in the file map.js in which the marker layer is created.

apavillet commented 11 years ago

I'll re open this since i'm not the only one :) I'm also having a really hard time finding what's causing the issue since it does not reproduce everytime.

jeroen commented 11 years ago

I opened a separate issue because I am not 100% confident that your problem is the same as mine, even though they appear both in chrome 24.

danzel commented 11 years ago

@apavillet can you put up a minimal case that I can reproduce this on please :)

jeroen commented 11 years ago

@apavillet are you still experiencing the issue after upgrading to leaflet 0.5?

apavillet commented 11 years ago

Hello,

Yes it seems we still have this issue ( http://homengo.com/recherche/?location=Paris%2020e%20Arrondissement,%2075020::city-30955&type=VEN&search_type=area)

apavillet commented 11 years ago

And I have to say it's the first time I have no idea of what's going on ...

DGuidi commented 11 years ago

I see a similar error using leaflet 0.5 and latest markercluster plugin, and looks not related to the number of markers. happens sometimes with chrome 26, looks ok with ff

danzel commented 11 years ago

@dguidi @apavillet can you post a reproduction outside of your application with steps to reproduce? Or at least a link to your application with steps to reproduce. I haven't reproduced in my random fiddling on that homengo link.

DGuidi commented 11 years ago

this problem happens "sometimes" so it's hard to reproduce. anyway I've used an older version of clustermarker lib and the problem doesn't happens anymore.so I think that it's related to latest changes in markercluster lib.

danzel commented 11 years ago

What version are you using that doesn't have the issue and what version are you using that does? A git hash woul be best, but even just a copy of the code would be good so I can diff for changes. Thanks!

DGuidi commented 11 years ago

there isn't a version number for markercluster plugin, so I can say that I've used a master file downloaded November, 27, and with this code all is ok. With the version downloaded some days ago I experience the issue. Using Leaflet 0.4.5 . Here the code: http://db.tt/1fgINvdp

edwolb commented 11 years ago

We're also experiencing this using standard custom marker images, polylines, Leaflet 0.5 and latest Chrome versions. Seems like the more elements are on a map, the slower it is. Sometimes the above screen is accompanied by a second flash where all the elements of the screen disappear except the markers.

Here is a video showing a very slight freeze. Sometimes it can happen for 30seconds +

http://screencast.com/t/L22AdKS9XUgC

apavillet commented 11 years ago

@DGuidi Do you still have this older version ? We could really use it while the problem is still here :)

Thanks

DGuidi commented 11 years ago

@apavillet svn power :)

edwolb commented 11 years ago

Reverting to 0.45 doesn't seem to help here. I have a feeling it has to do more with Chrome. I'm running 24.0.1312.57 m and am seeing it very frequently now.

danzel commented 11 years ago

@edwolb have you tried the version of markercluster linked by DGuidi: "Here the code: http://db.tt/1fgINvdp" Does that change the issue for you?

I've ran in to this once on our internal application (which I think is on quite an old markercluster version), the chrome tab I had open completely locked up, others were fine but that one didn't respond at all any more. Could be a chrome bug, but hard to repro :(

edwolb commented 11 years ago

Seems my issue is not related to markercluster, but the base Leaflet packet with Chrome.

apavillet commented 11 years ago

Anyone made progress on this ?

Thanks

theo-g commented 11 years ago

Hi, any hints on this issue?

mourner commented 11 years ago

Guys experiencing the issue, do you see the issue on moments where a zoom animation happens over a huge zoom level span, such as clicking on a cluster that leads to animated zooming by 10 levels? This is my guess looking at one of the videos above. Please confirm.

I've created a Leaflet issue to fix this: https://github.com/Leaflet/Leaflet/issues/1377 - seems to me that sometimes Chrome can't hande CSS3 Transform Transition with a too big scale (so that animated area gets to a huge size in pixels).

edwolb commented 11 years ago

No, at least I am only seeing it on initial page load.

On Thursday, February 14, 2013, Vladimir Agafonkin wrote:

Guys experiencing the issue, do you experience the issue on moments where a zoom animation happens over a huge zoom level span, such as clicking on a cluster that leads to animated zooming by 10 levels? This is my guess looking at one of the videos above. Please confirm.

I've created a Leaflet issue to fix this: Leaflet/Leaflet#1377https://github.com/Leaflet/Leaflet/issues/1377

— Reply to this email directly or view it on GitHubhttps://github.com/Leaflet/Leaflet.markercluster/issues/118#issuecomment-13542203.

danzel commented 11 years ago

We've ran in to this a few times in our application. We have: L.MarkerCluster L.Label L.Draw and usually lots of polygons and markers on the map

The lockup happens when doing a big zoom animation (and not very often or reproducibly), the zoom goes all the way in and then the whole tab locks up. Only experienced in chrome. I've never had a tab recover from this

@edwolb It looks like your map does a big zoom on initial load, so it is possibly related.

alpritt commented 11 years ago

I'm experiencing behaviour similar to danzel's.

I have MarkerCluster and no other plugins, no polygons, but about 750 markers with popups. It occurs when doing a large zoom from level 6 to 17. This is just the activity that gets performed most often so it may well happen at other zoom levels. The zoom is achieved using setView.

Only in Chrome, I've used Firefox lots with no problem. Not tested other browsers extensively. I could try doing some work in Safari to see if that brings it up since that is also webkit.

I haven't been able to reproduce it reliably either. And it locks up the whole tab every time the bug occurs. The tab freezes and the scrolling, etc stops responding.

jeroen commented 11 years ago

This might be unrelated, but I just discovered that some problems I have been experiencing in chrome for a while turned out to be due to a malfunction in a chrome extension (adblock). Make sure to disable chrome extensions and restart chrome when reproducing a problem.

sent from my droid On Feb 14, 2013 12:18 PM, "Alan Pritt" notifications@github.com wrote:

I'm experiencing behaviour similar to danzel's.

I have MarkerCluster and no other plugins, no polygons, but about 750 markers with popups. It occurs when doing a large zoom from level 6 to 17. This is just the activity that gets performed most often so it may well happen at other zoom levels. The zoom is achieved using setView.

Only in Chrome, I've used Firefox lots with no problem. Not tested other browsers extensively. I could try doing some work in Safari to see if that brings it up since that is also webkit.

I haven't been able to reproduce it reliably either. And it locks up the whole tab every time the bug occurs. The tab freezes and the scrolling, etc stops responding.

— Reply to this email directly or view it on GitHubhttps://github.com/Leaflet/Leaflet.markercluster/issues/118#issuecomment-13576177.

danzel commented 11 years ago

Closing this to continue discussion in Leaflet/Leaflet#1377. Seems big zooms = chrome lockups.