1

I created a simple project using "gdx-setup-ui.jar" and tried running all the projects. Android and desktop projects were running without any error. But when I launched the html project I got the following error. Any help??

22:07:35.374 [ERROR] [com.me.mygdxgame.GwtDefinition] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (InvalidStateError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(45), JavaScript object(44), JavaScript object(54)]): An attempt was made to use an object that is not, or is no longer, usable
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    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:242)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Unknown Source)
Daahrien
  • 10,190
  • 6
  • 39
  • 71
Vishal
  • 147
  • 10
  • There is a fix for that! See [this][1] question on StackOverflow. [1]: http://stackoverflow.com/questions/10971110/libgdx-setup-ui-gives-2-unexpected-errors-in-new-gwt-project – Mohammad Areeb Siddiqui Jun 21 '13 at 16:52
  • Are you saying that the project as generated by the setup-ui is showing this exception? Are you using the stable release or the nightly release? Did you "Run as Web Application" or "Debug as Web Application"? – nEx.Software Jun 21 '13 at 16:55
  • @nEx.Software : Yes the project as generated by setup-ui. I am using the stable release. I used Run as Web Application. – Vishal Jun 21 '13 at 17:26
  • @MohammadAreebSiddiqui That is not the issue I am facing. I have installed GWT tools and all. The project builds and compiles. But before launch it happens. I searched the error on google and from other cases of similar error, ifigured out that it has to do something with wrong type of object not being return by a javascript function via JSNI. But I have to edit the libgdx class but I want to know if there is something other than this. Or If i have understood wrong – Vishal Jun 21 '13 at 17:29
  • check this: http://www.gwtproject.org/javadoc/latest/com/google/gwt/core/client/JavaScriptException.html. Did this helped? – Mohammad Areeb Siddiqui Jun 21 '13 at 17:32

0 Answers0