4

My GWT application is throwing a JavaScriptException at a certain point. This issue only occurs in Internet Explorer (both IE 8 and IE 8 running IE7 mode).

The stack trace is as follows:

com.google.gwt.core.client.JavaScriptException: (Error): Invalid argument.
 number: -2147024809
 description: Invalid argument.
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.core.client.impl.Impl.apply(Impl.java)
com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
java.lang.Thread.run(Unknown Source)

Debugging has been impossible to say the least. Google has told me that this could be anything from a property being set improperly (ie a bad character like setWidth("190px!")) or setting a width to 0px or could be something else altogether.

Since the issue only shows up in IE, I've tried using the IE developer tools to debug, but have come up with nothing.

How can I go about debugging this properly?

thedude19
  • 2,643
  • 5
  • 34
  • 43

3 Answers3

2

This also happened to me and it's quite nightmare. Proper usage of some GIT/SVN/CVS whatever saves here situation really, getting to the point "where it worked" is great. So what can you do now:

  • temporarily get rid of all custom CSS and see what happens (leave just plain default CSS from GWT)
  • debug on external server, it's not that slow then
  • try to reproduce "certain point" and comment out any related lines
  • inspect generated site properly (some firebug-like tool for IE, I hope such thing exists)
  • as suggested above, use pretty/detailed output style
  • reading generated JavaScript from GWT never solved my problem :( It was usually CSS related stuff or custom usage of DOM from GWT
  • get folks (or do it yourself) to test various browsers on regular basis, it's just nobrainer
Xorty
  • 18,367
  • 27
  • 104
  • 155
  • These are great tips. A combination of them + using the Eclipse debugger to its full potential helped me track down the issue. It was a call to setRowSpan that was getting 0, which FF and Chrome ignore, but IE crashes on. – thedude19 Feb 21 '11 at 14:53
  • Amongst other things that can trigger this error: 1) appending an element that's not supported by the container (for instance, adding `embed` to `comment` at runtime doesn't work in IE8), 2) setting up an invalid CSS rule (typo in rule name, or invalid syntax entirely). – haylem Nov 13 '12 at 22:11
0

this code caused the same error for me

flexTableWidget.getElement().getStyle().setBackgroundColor("rgba(255,255,255,0.5)");
Jazi
  • 6,569
  • 13
  • 60
  • 92
Sameeh Harfoush
  • 610
  • 1
  • 8
  • 22
0

Compile your application with pretty output style for web mode. Then, you could get more information about this exception.

Gursel Koca
  • 20,940
  • 2
  • 24
  • 34