Re: How to debug a crash that occurs only when draftCompile=false?

2018-03-06 Thread Bruno Salmon
Thank you Vassilis, I didn't know about that option and this definitely 
helped me to identify and fix the problem.

I think the crash came from a GWT compiler bug but I found a workaround as 
explained below (I'm sharing in case this can help others).

That -style DETAILED compiler option is not as comfortable as the super dev 
mode but I could indeed at least recognize my java code within the 
javascript call stack, except for the very last call (the one causing the 
crash) which had actually nothing to do with the java caller code! GWT 
strangely jumped without explanation into a lambda expression that comes 
from another method of the same java class (perhaps with 
draftCompile=false, GWT tries to make some piece of code factorization 
including lambda expressions?). Anyway this lambda expression was 
translated into a javascript function that was called from 2 different 
places in the JS code whereas it is actually used only once in my java 
code, and that second place was in the caller code which was a complete 
compilation mistake. Hopefully when I rewrote my lamda expression using the 
old java 7 style in my java source code, GWT stopped doing that compilation 
mistake, so my app crash is now fixed :-)

Thanks for you help


Le lundi 5 mars 2018 22:03:36 UTC+1, Vassilis Virvilis a écrit :
>
> I would try to compile with -style DETAILED
>
> The generated js maps pretty well to the java code.
>
> Vassilis
>
> On Mon, Mar 5, 2018 at 5:52 PM, Bruno Salmon  > wrote:
>
>> hi,
>>
>> I have a GWT application that runs ok when draftCompile=false but crashes 
>> when turning draftCompile to true (which is the case in production).
>>
>> How can I fix that? Can it be related to something wrong in my java code 
>> source?
>>
>> The browser reports an exception (a classical property access problem on 
>> an undefined object) and I have the exact JS line where this happens, but 
>> it's not helpful if I can't match this line with my java code.
>> The problem is that when I run the app in super dev mode to get the 
>> source maps, the crash doesn't occur anymore... Is it because the code 
>> server automatically make a draft compile ? Can we avoid that to get the 
>> same result as the production environment?
>>
>> Thanks
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-web-toolkit+unsubscr...@googlegroups.com .
>> To post to this group, send email to google-we...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Vassilis Virvilis
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to debug a crash that occurs only when draftCompile=false?

2018-03-05 Thread Vassilis Virvilis
I would try to compile with -style DETAILED

The generated js maps pretty well to the java code.

Vassilis

On Mon, Mar 5, 2018 at 5:52 PM, Bruno Salmon  wrote:

> hi,
>
> I have a GWT application that runs ok when draftCompile=false but crashes
> when turning draftCompile to true (which is the case in production).
>
> How can I fix that? Can it be related to something wrong in my java code
> source?
>
> The browser reports an exception (a classical property access problem on
> an undefined object) and I have the exact JS line where this happens, but
> it's not helpful if I can't match this line with my java code.
> The problem is that when I run the app in super dev mode to get the source
> maps, the crash doesn't occur anymore... Is it because the code server
> automatically make a draft compile ? Can we avoid that to get the same
> result as the production environment?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Vassilis Virvilis

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.