We have found a fix to this problem. We were doing an RPC call before building all the UI. And just moving the RPC call to the end of the initialization routine has fixed the problem. Anyway, could there be a bug in the GWT code? I am asking because it is not clear to me if calling a RPC method before constructing some widgets should leave them in an illegal state.
On Dec 24 2008, 4:58 pm, Óscar Frías <[email protected]> wrote: > Hello. > > We have detected that our web application throws this Exception > sometimes: > > java.lang.IllegalStateException: Should only call onDetach when the > widget is attached to the browser's document > > We detect these exceptions because we have implemented a custom > exception handler that reports exceptions from the browser to our > server (code at the end). > The problem is that although this happens quite frequently (we see > this in our logs), we do not know how to reproduce it. According to > the logs timing it seems to happen (at least some of the times) when > leaving the page that contains the GWT app. But we are not completely > sure about this. > > Any idea about what could be happening, about the possible root cause, > or how to try to debug/fix it, etc. ? > Any help is appreciated. > > More information: > - Exception is only thrown from IE6 and IE7 browsers > - This did not happen with GWT version 1.4.62. It started happening > the same day we migrated to 1.5.3 > - The widget that throws the exception is an HTMLPanel. Its parent is > a Composite. > > In case you are interested, this is the site with the error (the GWT > app is the flight results page):http://www.trabber.com > > /* Code to report exceptions to the server */ > if (GWT.isScript()) { > GWT.setUncaughtExceptionHandler(new > GWT.UncaughtExceptionHandler() { > public void onUncaughtException(Throwable th) { > CommonService.App.getInstance().reportException > (th, myCallback); > } > }); > } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
