Closed GoogleCodeExporter closed 9 years ago
Forgot to add that the compiled version works.
Original comment by vladt...@gmail.com
on 29 May 2011 at 7:03
I can confirm this exception. Looking into it...
Original comment by pdr@google.com
on 29 May 2011 at 8:36
Should be fixed with http://code.google.com/p/forplay/source/detail?r=109
Side note: Not to keep bringing this up, but
com.allen_sauer.gwt.log.client.ConsoleLogger causes the error this user
received to be unreadable to the average user. Instead of getting an error
about createElement failing, they got 50 lines about a javascript exception in
ConsoleLogger. Removing all the console logging modifications and returning
logging to just "System.out.println()", the true error was easy to locate.
Original comment by pdr@google.com
on 29 May 2011 at 9:41
Thanks for fixing this.
I filed a bug for the underlying development mode issue we tickled by
inadvertently calling RootPanel.getBodyElement().setInnerHTML("") here:
http://code.google.com/p/google-web-toolkit/issues/detail?id=6419
--------------------------------
Side note reply:
I agree wholeheartedly that gwt-log should not make it harder to find bugs. If
it ever does, you can and should yell at me :)
In this case, had we not used gwt-log at all, then HtmlLog's info() method
would've likely been a simple JSNI method that looked something like this:
public native void info(String msg) /*-{
console.debug(msg);
}-*/;
The above GWT bug
(http://code.google.com/p/google-web-toolkit/issues/detail?id=6419) would've
prevented that JSNI method from executing in development mode. The GWT
development console would've equally uselessly read:
23:00:07.305 [ERROR] [peas] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (String): invoke of
@forplay.html.HtmlLog::info(Ljava/lang/String;) failed
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at forplay.html.HtmlLog.info(HtmlLog.java)
at forplay.html.HtmlPlatform.run(HtmlPlatform.java:193)
at forplay.core.ForPlay.run(ForPlay.java:143)
at forplay.sample.peas.html.PeasHtml.start(PeasHtml.java:31)
at forplay.html.HtmlGame$1.execute(HtmlGame.java:25)
at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:228)
at com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:388)
at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78)
at com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:171)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:613)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:171)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:722)
So, after setting body.innerHTML='', all Java methods, including
System.out/err.println() still work, but development mode no longer knows how
to do anything in JSNI, breaking all communication with the browser, including
preventing logging to the browser's console, calling $wnd.alert(), etc.
(We should probably move the side note discussion to the discussion list
https://groups.google.com/forum/#!forum/gwt-forplay going forward)
Original comment by fredsa@google.com
on 30 May 2011 at 6:14
Original issue reported on code.google.com by
vladt...@gmail.com
on 29 May 2011 at 7:01