Troubleshooting compilation issues?

109 views
Skip to first unread message

David Becker

unread,
Sep 30, 2016, 4:50:25 PM9/30/16
to GWT Users
Any advice on how to trouble shoot code that runs fine in SDM but causes lockups when run in full compiled mode? Using the -draftCompile flag fixes it in compiled mode too. This suggests that something in the optimizations isn't playing nice with the code, but I'm at a bit of a loss for how to figure out what it is. I've observed the behavior on 2.8.0-RC2 & -RC3 (not sure about older versions).

Thanks in advance for any advice!

Ali Jalal

unread,
Oct 1, 2016, 6:55:59 AM10/1/16
to google-we...@googlegroups.com
Hi,

when the problem happened? In compilation process or in application loading and execution?

If the problem is in compilation process, you could try '-optimize 8' (or lower optimization level) as gwt compiler parameter. There are some situations which cause gwt compile takes so long.

Regards.

On Sat, Oct 1, 2016 at 12:20 AM, David Becker <david....@sencha.com> wrote:
Any advice on how to trouble shoot code that runs fine in SDM but causes lockups when run in full compiled mode? Using the -draftCompile flag fixes it in compiled mode too. This suggests that something in the optimizations isn't playing nice with the code, but I'm at a bit of a loss for how to figure out what it is. I've observed the behavior on 2.8.0-RC2 & -RC3 (not sure about older versions).

Thanks in advance for any advice!

--
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+unsub...@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.

David Becker

unread,
Oct 1, 2016, 10:19:40 AM10/1/16
to google-we...@googlegroups.com
The problem happens at runtime during use of the application. Things seem to work OK at first, but after certain actions are taken (seemingly related to some DOM event handlers, but I'm not sure) the application stops responding to the mouse or keyboard. The only thing I am sure of at the moment is that everything works fine in SDM or if I compile with -draftComplie. I haven't yet tried other compilation levels.

Thanks for the link to the other conversation, I'll check that out!


On Saturday, October 1, 2016, Ali Jalal <ali.j...@gmail.com> wrote:
Hi,

when the problem happened? In compilation process or in application loading and execution?

If the problem is in compilation process, you could try '-optimize 8' (or lower optimization level) as gwt compiler parameter. There are some situations which cause gwt compile takes so long.

Regards.
On Sat, Oct 1, 2016 at 12:20 AM, David Becker <david....@sencha.com> wrote:
Any advice on how to trouble shoot code that runs fine in SDM but causes lockups when run in full compiled mode? Using the -draftCompile flag fixes it in compiled mode too. This suggests that something in the optimizations isn't playing nice with the code, but I'm at a bit of a loss for how to figure out what it is. I've observed the behavior on 2.8.0-RC2 & -RC3 (not sure about older versions).

Thanks in advance for any advice!

--
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+unsubscribe@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.

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/C04ThMTNfls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@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.


--
-.. .- ...- .. -.. ... -... . -.-. -.- . .-.
This message was sent from my mobile phone. Please excuse any typos or auto-corrections I might have missed.

Mike Warne

unread,
Oct 1, 2016, 3:24:12 PM10/1/16
to GWT Users
Do you have any JavaScript exceptions in your browser console? Sometimes an exception will cause important code to be skipped, causing your app to be unresponsive.

David Becker

unread,
Oct 1, 2016, 3:34:17 PM10/1/16
to google-we...@googlegroups.com
I'll do some more diagnostics on it come Monday. 

Thanks for the advice...


On Saturday, October 1, 2016, Mike Warne <mike....@gmail.com> wrote:
Do you have any JavaScript exceptions in your browser console?   Sometimes an exception will cause important code to be skipped, causing your app to be unresponsive.

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/C04ThMTNfls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.

David Becker

unread,
Oct 3, 2016, 1:42:38 PM10/3/16
to GWT Users
I'm not getting anything on the console logs and I've verified that I've got an uncaught exception handler set. However, when I profile during this frozen state, all profile entries seem to lead to this:

d,com.google.gwt.core.client.JavaScriptException::name,com.google.gwt.core.client.JavaScriptException,name,com/google/gwt/core/client/JavaScriptException.java,98,-1

So it sounds like you might be on to something, Mike. I'm now trying to narrow it down with DETAILED output and will also experiment with different optimization levels.

Thanks again!

On Saturday, October 1, 2016 at 12:34:17 PM UTC-7, David Becker wrote:
I'll do some more diagnostics on it come Monday. 

Thanks for the advice...

On Saturday, October 1, 2016, Mike Warne <mike....@gmail.com> wrote:
Do you have any JavaScript exceptions in your browser console?   Sometimes an exception will cause important code to be skipped, causing your app to be unresponsive.

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/C04ThMTNfls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.

David Becker

unread,
Oct 3, 2016, 4:45:02 PM10/3/16
to GWT Users
The profile entries that pointed to JavaScriptException in obfuscated output now points to a lambda in detailed output, so I think that's a red herring. I commented out the lamba in question and those profile entries went away, but the problem persists, so I don't think it's the lamba itself.

I've also tried every optimization level and every optional switch and the only thing that works is -optimizationLevel=0 or -draftCompile. I tried diff'ing the detailed output between optimization level 0 and 1, but there's just too many changes for that to be a useful debugging technique.

Any additional suggestions?

David Becker

unread,
Oct 3, 2016, 9:24:39 PM10/3/16
to GWT Users
I found some JSNI code that was inadvertently doing a javascript object clone of a GWT object. Fixing that solved my problem. Although it's still not clear why it would only trigger in optimized code and not draft compile or why no exceptions were being captured in the console. Oh well, it's fixed now.

Thank you all for your suggestions!
Reply all
Reply to author
Forward
0 new messages