(Warning, long text ahead.)

Hey everybody,

I have a couple of observations and questions. First, I can reproduce
this with Chrome 12.0.742.122 (stable) and 14.0.823.0 (canary), though
with the latter, the Chrome GPU Process (from the Task Manager) memory
keeps on filling up the RAM and the tab doesn't seem to crash
immediately but freeze after a while.

Also, I have been able to (re)produce a problem in Firefox 5.0,
although I turned up the vapor a bit of the example above (i.e.
changed the setInterval()'s interval from 40 to 10 ms). After 20
seconds or so, artefacts of the marker image start to show up:
http://i.imgur.com/biNWa.jpg
And after a couple of seconds more, Firefox crashes:
http://i.imgur.com/VZAdw.png

More observations: This bug does not seem to exist in the oldest
version of the Maps API, version 3.3, so I guess this issue is
specific to the HTML canvas element which is used in the API version
3.4 and later AFAIK.
Also, I'm not sure whether this issue is now officially API-specific
or Chromium-specific, since the issue linked in the first post has
been tracked down to this Chromium issue:
http://code.google.com/p/chromium/issues/detail?id=42679
Then again, this problem does seem to exist in Firefox as well. Maybe
there is a problem in both browsers as the HTML canvas element has
only recently been getting more attention (in comparison to other,
more established Web techniques).

By the way, panning and zooming is probably not related to this issue.
What I did to reproduce the problem is zooming out of the map a few
steps right after loading and panned the map so the marker would start
at the bottom left corner. Also, the marker needs to be visible all
the time.

So, here's the problem I have: I'm the developer of a browser game
that heavily relies on the Google Maps API and there are a lot of
(somewhere between 1 and 100) moving marker images and custom map
overlays on the map, so there are a lot of setPosition() calls. The
overlays can be drawn on the map with a specific refresh rate (frames
per second, FPS), the default value is 10 FPS.
The newest API version I've been using was 3.3, and just recently I've
been trying out 3.4 and 3.5. Beginning with these API update tests,
I've been getting complaints about seemingly random crashes after
playing the game for 10-20 minutes. This seems to fit the pattern of
the problem of this thread, since the setPosition calls are not as
frequent as in the example, but the memory leak probably becomes
bigger over time, nevertheless.

I'm wondering now what I should do to fix the problem. For now, just
using version 3.3 is enough, but I guess it won't be around forever.
Also, I've been able to delay the problem by lowering the FPS value
(e. g. to 1); the memory usage was increasing much slower. (Note that
lowering the FPS rate does not change the game speed which actually is
what makes me think my problem is related to this thread.)
Although the problem in Google Chrome has been noticed, this doesn't
comfort me too much since my linked issue above has been an unresolved
priority 1 for over a year now. Maybe it will get traction again as
Jens's issue has just recently been linked to it, though.

So, has anybody an idea what I could do or any other thoughts on the
topic? Also, please let me know if I can provide further information
on my problem or what I did to reproduce the crashes.

Regards
Serhan


On 21 Jun., 01:49, Chris Broadfoot <c...@google.com> wrote:
> I can't reproduce this. I actually left it on overnight and it's still
> going.
>
> --http://twitter.com/broady
>
> On Mon, Jun 20, 2011 at 9:44 PM, Jens Lykke Brandt <
>
>
>
>
>
>
>
> jenslykkebra...@gmail.com> wrote:
> > Hi there,
>
> > Example:http://ingenadgang.dk/chrome/test.htm
>
> > It works in all other browsers - not in Google Chrome (12.0.742.100 and
> > 14.0.794.0 (Canary)): Here the Marker moves for about two minutes or so -
> > then Chrome crashes ("Aw, snap").
> > I've posted the issue at the chrome-bugtracker as well:
> >http://code.google.com/p/chromium/issues/detail?id=86520
>
> > It's a setPosition many, many times on a marker.
> > The memory-usage builds up, is cut down once and then it builds up again
> > until it crashes.
>
> > Code snippet:
> > ...
> >         --- SOME STANDARD INIT CODE ---
> >         // Start interval
> >         setInterval("setpoint()", 40);
> >     }
>
> >     // move point
> >     function setpoint() {
> >         // Set new position
> >         marker.setPosition(new google.maps.LatLng(lat, lng));
> >         // Update position
> >         lat += 0.0000001;
> >         lng += 0.0000001;
> >     }
> > ...
>
> > Ideas?
>
> > Kind regards
> > Jens
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/google-maps-js-api-v3/-/9CxlfTr40ToJ.
> > To post to this group, send email to
> > google-maps-js-api-v3@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-maps-js-api-v3+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to