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:
1) the application is run on Google Chrome, and
2) the GWT JavaScript compiler output style is set to 'OBF'.
So, running the application on Firefo开发者_运维问答x 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?
Thhere'a an issue that might be related - are you using any JSNI? And I'd really recommend upgrading GWT/GXT - it should be pretty straightforward (at least for vanilla GWT :)).
精彩评论