GWT application throws an exception when run on Google Chrome with compiler output style set to 'OBF

Posted by Elifarley on Stack Overflow See other posts from Stack Overflow or by Elifarley
Published on 2010-06-11T19:04:00Z Indexed on 2010/06/12 8:42 UTC
Read the original article Hit count: 330

Filed under:
|
|

I'd like to know if you guys have faced the same problem I'm facing, and how you are dealing with it.

Sometimes, a small and harmless change in a Java class ensues strange errors at runtime.

These errors only happen if BOTH conditions below are true:

2) the application is run on Google Chrome, and

1) the GWT JavaScript compiler output style is set to 'OBF'.

So, running the application on Firefox or IE always works. Running with the output style set to 'pretty' or 'detailed' always works, even on Google Chrome.

Here's an example of error message that I got:

"((TypeError): Property 'top' of object [object DOMWindow] is not a function stack"

And here's what I have: - GWT 1.5.3 - GXT 1.2.4 - Google Chrome 4 and 5 - Windows XP

In order to get rid of this Heisenbug, I have to either deploy my application without obfuscation or endure a time-consuming trial-and-error process in which I re-implement the change in slightly different ways and re-run the application, until the GWT compiler is happy with my code.

Would you have a better idea on how to avoid this?

© Stack Overflow or respective owner

Related posts about error

Related posts about gwt