Closed GoogleCodeExporter closed 9 years ago
When testing on a mac using the HelloMaps sample, I can see an exception in
Hosted
mode, but web mode seems to work O.K for Safari and FF3.
Original comment by galgwt.reviews@gmail.com
on 12 Aug 2008 at 9:56
Tested on linux w/ current trunk and did not see the exception.
Tested on windows w/ current trunk and did not see the exception.
I went back to my mac laptop and couldn't reproduce the problem, even going to
the
1.5 Release branch.
Can you send me a reproducible test case?
Original comment by galgwt.reviews@gmail.com
on 12 Aug 2008 at 3:09
Here is the issue:
When the info window pops down, it tries to remove the maximized content from a
panel
widget kept privately inside of the InfoWindow instance. If the window is never
popped up, the maixmized content is never properly attached at the DOM level and
things are just all screwed up.
Acc'd to Joel, the right thing to do here is to keep track of when the
maximizedTitle
maximziedContent and regular content widgets are all swapped out with each
other. We
can do this by tapping into the Maximize and Restore events on the map.
In the mean time, this is just an ugly problem in hosted mode. It likely causes
a
memory leak each time an info window with widgets defined is opened/closed.
Original comment by galgwt.reviews@gmail.com
on 12 Aug 2008 at 4:56
Hi,
I have the same kind of problem when using an InfoWindow that have two widgets
: one
standard, and one for the maximized state.
When you click on a marker, everything is fine, when you click on another marker
without closing the window, this exception occurs.
[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (TypeError): Cet objet ne gère
pas
cette propriété ou cette méthode
number: -2146827850
description: Cet objet ne gère pas cette propriété ou cette méthode
at com.google.gwt.dom.client.Node$.removeChild$(Native Method)
at com.google.gwt.user.client.DOM.removeChild(DOM.java:1050)
at com.google.gwt.user.client.ui.ComplexPanel.remove(ComplexPanel.java:61)
at com.google.gwt.user.client.ui.Widget.removeFromParent(Widget.java:65)
at com.google.gwt.maps.client.InfoWindow$VirtualPanel.beginAttach(InfoWindow.java:62)
at com.google.gwt.maps.client.InfoWindow.beginAttach(InfoWindow.java:504)
at com.google.gwt.maps.client.InfoWindow.open(InfoWindow.java:303)
...
at my code
...
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(Re
questCallbackAdapter.java:215)
at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl(Request.java:254)
at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch(Request.java:226)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:217)
Original comment by mehdi.ra...@gmail.com
on 23 Aug 2008 at 3:32
mehdi: This is the same bug. It should be completely invisible in web mode,
and the
only problem is a memory leak each time an info window is popped down. It will
be
addressed in an upcoming release.
Original comment by galgwt.reviews@gmail.com
on 23 Aug 2008 at 10:54
I wanted to let you that I tested the trunk version today (r751) and I still
have the
same problem.
Since I think you know it, I'd prefer to ask if there's I way I can help to fix
this
? (I really need to fix this before I can release the first version of my
webapp.)
Original comment by mehdi.ra...@gmail.com
on 29 Aug 2008 at 11:15
We will be working on this issue soon. However, I am unaware of any user
visible
issues related to this problem.
Original comment by galgwt.reviews@gmail.com
on 30 Aug 2008 at 11:30
Well, when you click for a second time on a marker (the same marker, or another
one),
you expect an infowindow to open, but instead nothing happen. (or the already
opened
infowindow is cleared)
And this is in hosted mode and ie. in firefox, sometime you can't open any more
infowindow.
Original comment by mehdi.ra...@gmail.com
on 30 Aug 2008 at 12:21
you can test the bug I'm talking about in the last comment with this code
snippet :
final MapWidget map = new MapWidget(new LatLng(0, 0), 3);
map.setSize("100%", "100%");
for (int i = 0; i < 2; i++) {
final LatLng coord = new LatLng(Random.nextDouble() * 50,
Random.nextDouble() * 50);
Marker marker = new Marker(coord);
marker.addMarkerClickHandler(new MarkerClickHandler() {
public void onClick(MarkerClickEvent event) {
InfoWindowContent content = new InfoWindowContent(
new HTML("minimized content"));
content.setMaxContent(new Frame("http://google.fr"));
map.getInfoWindow().open(coord, content);
}
});
map.addOverlay(marker);
}
RootPanel.get().add(map);
Click on a marker then on the other one.
Original comment by mehdi.ra...@gmail.com
on 30 Aug 2008 at 10:03
Original comment by galgwt.reviews@gmail.com
on 2 Sep 2008 at 2:00
Fix commited as r783.
Original comment by galgwt.reviews@gmail.com
on 11 Sep 2008 at 7:28
hi,
little question: does this fix was included in the 1.0 release? (I ask because
I
still have the bug)
Original comment by mehdi.ra...@gmail.com
on 26 Sep 2008 at 7:43
I thought this was. Does the stack trace look the same?
Original comment by ericzun...@gmail.com
on 26 Sep 2008 at 8:59
yes, here it is :
[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (TypeError): Cet objet ne gère
pas cette propriété ou cette méthode
number: -2146827850
description: Cet objet ne gère pas cette propriété ou cette méthode
at com.google.gwt.dom.client.Node$.removeChild$(Native Method)
at com.google.gwt.user.client.DOM.removeChild(DOM.java:984)
at com.google.gwt.user.client.ui.ComplexPanel.remove(ComplexPanel.java:61)
at com.google.gwt.user.client.ui.Widget.removeFromParent(Widget.java:65)
at com.google.gwt.maps.client.InfoWindow$VirtualPanel.attach(InfoWindow.java:64)
at com.google.gwt.maps.client.InfoWindow$8.onMaximizeEnd(InfoWindow.java:599)
at com.google.gwt.maps.client.InfoWindow$3.callback(InfoWindow.java:177)
at com.google.gwt.maps.client.impl.EventImpl$VoidCallback.execute(EventImpl.java:231)
at com.google.gwt.maps.client.impl.EventImpl.invokeAndReportUncaughtExceptions(EventImpl.java:260)
at com.google.gwt.maps.client.impl.EventImpl.invokeAndMaybeReportUncaughtExceptions(EventImpl.java:246)
at com.google.gwt.maps.client.impl.EventImpl.access$0(EventImpl.java:241)
at com.google.gwt.maps.client.impl.EventImpl$VoidCallback.callbackWrapper(EventImpl.java:227)
at com.google.gwt.maps.client.impl.__InfoWindowImplImpl.maximize(Native Method)
at com.google.gwt.maps.client.InfoWindow.maximize(InfoWindow.java:284)
..my code..
at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl(Request.java:254)
at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch(Request.java:226)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:217)
Original comment by mehdi.ra...@gmail.com
on 26 Sep 2008 at 9:16
Original comment by galgwt.reviews@gmail.com
on 27 Sep 2008 at 1:17
I too am still experiencing this error using 1.0.
Here is the stack-trace:
[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't
support
this property or method
number: -2146827850
description: Object doesn't support this property or method
at com.google.gwt.dom.client.Node$.removeChild$(Native Method)
at com.google.gwt.user.client.DOM.removeChild(DOM.java:984)
at com.google.gwt.user.client.ui.ComplexPanel.remove(ComplexPanel.java:61)
at com.google.gwt.maps.client.InfoWindow.removeContentWidgets(InfoWindow.java:679)
at com.google.gwt.maps.client.InfoWindow.access$2(InfoWindow.java:677)
at com.google.gwt.maps.client.InfoWindow$7.onInfoWindowClose(InfoWindow.java:559)
at com.google.gwt.maps.client.MapWidget$3.callback(MapWidget.java:329)
at com.google.gwt.maps.client.impl.EventImpl$VoidCallback.execute(EventImpl.java:231)
at
com.google.gwt.maps.client.impl.EventImpl.invokeAndReportUncaughtExceptions(Even
tImpl.java:260)
at
com.google.gwt.maps.client.impl.EventImpl.invokeAndMaybeReportUncaughtExceptions
(EventImpl.java:246)
at com.google.gwt.maps.client.impl.EventImpl.access$0(EventImpl.java:241)
at
com.google.gwt.maps.client.impl.EventImpl$VoidCallback.callbackWrapper(EventImpl
.java:227)
Here is an excerpt of my code:
marker.addMarkerClickHandler(new MarkerClickHandler(){
public void onClick(MarkerClickEvent event) {
// Define content
HTML addressInfo = new HTML("<html>123 A Street</html>");
InfoWindowContent infoWindowContent = new InfoWindowContent(addressInfo);
// Open info window
InfoWindow infoWindow = map.getInfoWindow();
//infoWindow.open(billingLatLng, infoWindowContent);
infoWindow.open(event.getSender(), infoWindowContent);
}
});
map.addOverlay(marker);
A few observations:
1) The uncaught exception is thrown when the info window closes (initially I
thought
it was being thrown when clicking on the marker, and/or by extension, when the
info
window was trying to open).
2) Although the info window pops up empty, it is appropriately sized for what
the
content should be.
3) The uncaught exception only happens after explicitly closing the info
window. If I
close the info window implicitly (e.g. by clicking outside it on the map), no
exception is thrown but the same behavior is triggered i.e. the empty info
window.
4) IE7 JavaScript error triggered by explicitly closing info window:
'parentElement'
is null or not an object
5) Error happens in hosted mode, IE7, and Firefox
Original comment by micky.jo...@gmail.com
on 29 Sep 2008 at 3:22
The previous fix involved catching the info window close and maximize events in
order to remove elements from
the DOM. In the case of an info window opened from the marker, the events fire
on the marker object, not the
map, so I need to extend the logic there.
Original comment by galgwt.reviews@gmail.com
on 30 Sep 2008 at 12:32
The attached patch seems to solve the crash from comment 16.
Original comment by Beefjerk...@gmail.com
on 30 Sep 2008 at 9:31
Attachments:
In addition to the marker issue, it seems that events might not be firing in
the order I expected them to.
Updated patch that includes a bunch of debugging and some defensive programming
to keep from attaching
widgets twice or registering the same event handler twice.
Note: this is not the final patch - it contains a lot of debugging.
Original comment by galgwt.reviews@gmail.com
on 1 Oct 2008 at 2:38
Attachments:
Thanks for the quick turnaround. I'm not familiar with applying patches to my
environment. Can you point me the right direction?
Original comment by micky.jo...@gmail.com
on 1 Oct 2008 at 3:11
This document describes working with source in Eclipse:
http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis&t=GettingS
tartedSource
All you really need to do for the patch is to download the latest subversion
source (as described) from
https://gwt-google-apis.google.com/svn/releases/maps/1.0/
apply the patch with
cd <root of maps directory>
patch -p0 < file.patch
then build the project with 'ant'
Original comment by galgwt.reviews@gmail.com
on 1 Oct 2008 at 4:16
Works great, Eric! Thanks!
You may also close
http://code.google.com/p/gwt-google-apis/issues/detail?id=181. You
were right, it was the same issue.
Original comment by alexey.f...@gmail.com
on 1 Oct 2008 at 6:39
I downloaded and compiled the subversion source (rev. 860) using the links you
posted...thanks.
Unfortunately it seems the issue is only partially fixed.
I can still reproduce the problem using the following steps:
1) Create and open a Map with Markers A and B
2) Click on Marker A: InfoWindow is displayed with some content
3) Click on Marker B: InfoWindow for Marker A closes; InfoWindow for Marker B
opens
4) Close InfoWindow using the close 'x' button : InfoWindow closes
5) Click on either Marker: InfoWindow opens but is empty
Original comment by micky.jo...@gmail.com
on 2 Oct 2008 at 6:29
Updated patch attached. It still contains debugging code that logs to the
Development Shell window that I will remove before submitting it.
Original comment by galgwt.reviews@gmail.com
on 6 Oct 2008 at 9:01
Attachments:
Functionality looks good. Issue from comment 23 is fixed. Thanks.
Original comment by micky.jo...@gmail.com
on 7 Oct 2008 at 1:29
Got confirmation from Mehdi that this worked for him. Removed debugging and
sent
code review out to Joel.
Original comment by galgwt.reviews@gmail.com
on 13 Oct 2008 at 3:15
Attachments:
Original comment by galgwt.reviews@gmail.com
on 13 Oct 2008 at 3:15
Review by jgw. Committed as r924.
Original comment by galgwt.reviews@gmail.com
on 24 Nov 2008 at 4:45
Original comment by galgwt.reviews@gmail.com
on 24 Nov 2008 at 4:46
Original comment by galgwt.reviews@gmail.com
on 11 Dec 2008 at 3:08
Original comment by zundel@google.com
on 21 Dec 2009 at 1:57
Original issue reported on code.google.com by
galgwt.reviews@gmail.com
on 12 Aug 2008 at 9:45