I've not seen
this specific issue (GWT 2.5.0 from Juno or maven command line on both
mac and linux) in my projects that use RequestFactory, at least not from
a source where I can point to as our own JSNI mistakes.
One kind
of error I've seen that only emerges in OBF is JSNI local variable
rewriting. In the specific cases I'm referring to, it usually only
matters when something is relying on that name staying the same, such as
an eval. Which is not great code to have in a library anyway...
If
using 2.5.0 and the optional Closure Compiler optimization, more issues
like this can arise - Closure is much more aggressive than style=OBF.
One
more thing to consider - is your optimization level the same when
running as both OFB and PRETTY? By default, setting the style to PRETTY
turns down the optimizations level. I'm having trouble backing up this
statement with source code, so take it with a grain of salt, but perhaps
try setting -optimize 9 (see
https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#DevGuideCompilerOptions)
or optimizationLevel set to 9 if using maven (see
http://mojo.codehaus.org/gwt-maven-plugin/compile-mojo.html#optimizationLevel).
And
finally, does it work with DETAILED? The string interning optimization
is skipped in PRETTY, as to make code more readable, but is run when you
use DETAILED, as a sort of way to get slightly readable OBF code.
If
all of these don't work, you may be left with using sourcemaps to seewhere in Java code it is failing, or pause on exception in a JS debugger, and
try to find a variable or stack frame that looks like code you know to
see where it is happening.
On Thursday, December 13, 2012 3:45:02 AM UTC-6, BDT wrote:
Suddenly I am getting all kinds of runtime exceptions when compile obfuscated. If I compile set to pretty, everything is fine. This is not new code and I did not just update my tools. I have tried completely cleaning everything out and rebuilding, reverting to old known good code, etc to no avail.
I am using GWT 2.5 + Eclipse Juno on a Mac. I am running on the assumption that I must have changed something in the environment but I don't know what.
The most common exception is an UnsupportedOperationException from ValueCode.java:339 when making RequestFactory calls (.fire).