You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GWT version: 2.8.2 Browser (with version): doesn't matter Operating System: Mac OS X (probably others as well) with Eclipse
Description
If there is an endless recursion in the program, then it can happen the GWT compiler hangs directly after "Compiling permutation 0..." (no more messages, even if all messages are enabled). Instead of this the compiler should write an error message or at least compile the code (in the latter case there would be a well defined stack overflow when testing the code).
In Eclipse there is no java error because the program is syntactically correct.
In dev mode the program runs, and as long as the endless recursion is not called you don't see the error.
When compiling, the compiler just hangs, and in big and complex projects it can be very difficult to isolate the error (in my case it took me nearly three days).
Steps to reproduce
The following code (just replacing the entry point module in the default greetings application) does the thing:
public class EndlessRecursion implements EntryPoint {
public String stupid(int x) {
return stupid(x);
}
public void onModuleLoad() {
String q = "text";
String issue = String.valueOf(Math.random());
if ("999".equals(issue)) {
q = stupid(0);
}
RootPanel.get("nameFieldContainer").add(new HTML(q));
}
}
The method stupid() is obviously nonsense. If you have different method signatures and you add an parameter it can happen this is not so obvious.
The java compiler doesn't report an error. The GWT compiler hangs.
Known workarounds
The problem is to isolate the error. The only way I found doing so is to put parts of the code into comments, start the compiler again and see if it still hangs. (If there are many classes this can be time consuming, and you need really many tries, and the code optimizations done by the GWT compiler can lead you on a wrong track.)
Once the error found it is easy to correct it.
The text was updated successfully, but these errors were encountered:
GWT version: 2.8.2
Browser (with version): doesn't matter
Operating System: Mac OS X (probably others as well) with Eclipse
Description
If there is an endless recursion in the program, then it can happen the GWT compiler hangs directly after "Compiling permutation 0..." (no more messages, even if all messages are enabled). Instead of this the compiler should write an error message or at least compile the code (in the latter case there would be a well defined stack overflow when testing the code).
In Eclipse there is no java error because the program is syntactically correct.
In dev mode the program runs, and as long as the endless recursion is not called you don't see the error.
When compiling, the compiler just hangs, and in big and complex projects it can be very difficult to isolate the error (in my case it took me nearly three days).
Steps to reproduce
The following code (just replacing the entry point module in the default greetings application) does the thing:
The method
stupid()
is obviously nonsense. If you have different method signatures and you add an parameter it can happen this is not so obvious.The java compiler doesn't report an error. The GWT compiler hangs.
Known workarounds
The problem is to isolate the error. The only way I found doing so is to put parts of the code into comments, start the compiler again and see if it still hangs. (If there are many classes this can be time consuming, and you need really many tries, and the code optimizations done by the GWT compiler can lead you on a wrong track.)
Once the error found it is easy to correct it.
The text was updated successfully, but these errors were encountered: