com.google.gwt.core.client.JavaScriptException: (TypeError) : a is nullcom.google.gwt.dom.client.DOMImplMozilla.$getBodyOffsetLeft(DOMImplMozilla.java:145)com.google.gwt.user.client.ui.PopupPanel.$setPopupPosition(Document.java:1287)com.google.gwt.user.client.ui.PopupPanel.setPopupPosition(PopupPanel.java:884)com.google.gwt.user.client.ui.PopupPanel.PopupPanel(PopupPanel.java:453)com.typeracer.commons.client.widgets.EnhancedPopup.EnhancedPopup(EnhancedPopup.java:32)com.typeracer.commons.client.widgets.PopupWithIcon.PopupWithIcon(PopupWithFocusableTextBox.java:28)com.typeracer.main.client.controller.TyperacerUncaughtExceptionHandler$1.execute(TyperacerUncaughtExceptionHandler.java:55)com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:50)etc... :-)
lineNumber: 3190 columnNumber: 15354: a is null; (TypeError) fileName: http://localhost:8088/9C4DC2D905BEA407601C92C56B43E3B8.cache.htmletc... :-(
I would like to announce that I have finally solved what I always thought to be GWT's greatest weakness: its lack of debugging information for client-side exceptions in production.With my patch, your deployed app will be able to report stack traces like this:com.google.gwt.core.client.JavaScriptException: (TypeError) : a is nullcom.google.gwt.dom.client.DOMImplMozilla.$getBodyOffsetLeft(DOMImplMozilla.java:145)com.google.gwt.user.client.ui.PopupPanel.$setPopupPosition(Document.java:1287)com.google.gwt.user.client.ui.PopupPanel.setPopupPosition(PopupPanel.java:884)com.google.gwt.user.client.ui.PopupPanel.PopupPanel(PopupPanel.java:453)com.typeracer.commons.client.widgets.EnhancedPopup.EnhancedPopup(EnhancedPopup.java:32)com.typeracer.commons.client.widgets.PopupWithIcon.PopupWithIcon(PopupWithFocusableTextBox.java:28)com.typeracer.main.client.controller.TyperacerUncaughtExceptionHandler$1.execute(TyperacerUncaughtExceptionHandler.java:55)com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:50)etc... :-)instead of the current state of affairs that looks like this:lineNumber: 3190 columnNumber: 15354: a is null; (TypeError) fileName: http://localhost:8088/9C4DC2D905BEA407601C92C56B43E3B8.cache.htmletc... :-(
I certainly applaud the obvious time, effort, and care that you've put into these improvements, but "45% size and 22-44% execution speed overhead" sounds like a rather painful penalty to pay. I'm not sure that's going to be worth using in a performance-sensitive application.
Also, how much does this affect compilation time?
If you use emulated stack traces (including line numbers) in current GWT your app size will roughly increase by 100%. So 45% is a lot better of what GWT gives you today.
So, something like this has been used at least internally for quite a long time -- what exactly did you have to change in StackTraceDeobfuscator?
I'm not sure that's going to be worth using in a performance-sensitive application. Also, how much does this affect compilation time?
Do you plan to maintain that code if it is integrated into GWT or will it be a one time contribution and other people have to wrap their head around it again if your solution needs to be adjusted?
I ask this because GWT will drop support for IE6/7 relatively soon and probably by the end of 2014 drop support for IE8. Also Opera has switched to Blink/V8 which makes the opera permutation obsolete in the near future. So by the end of 2014 (GWT 3.x) Firefox, Safari, Chrome and Opera are likely to support SourceMaps and in case of IE9+ stack trace emulation is probably not needed.
So by the end of next year a bunch of your code can probably be deleted and other code refactored/optimized to fit this situation. Have you thought about that?
What sort of approach does the current emulated stack implementation use, as opposed to the suggested function enter/exit approach? Is there a relative speed hit involved with it too?
Because if so, bring on the new implementation ASAP :)
Jens, even with source maps in Chrome, I've been unable to get stack traces to work. They still print out poorly in production when an exception is hit - the exceptions ignore the source maps entirely. I asked previously if there is a way around it, but apparently it's a known issue - so I don't think SourceMaps solve this problem yet.That said, the size and speed overhead here is terrible and most people would avoid something that adds that much overhead in production (although it would be great in development).What GWT needs here is something closer to what you get with proguard - a mapping file created during compilation that could be used to run the obfuscated/javascript exception through a utility to give the correct stack trace with zero overheads.I'm not entirely sure on how proguard accomplishes it, but I'd say it would be the perfect solution.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/1qDVlPGryKo/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.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Thomas,It would be great if you (or anybody who understands how to set it up) could add a small article on gwtproject.org about setting up the different methods of getting stack traces in production on exceptions?Thanks!Ryan
On Thu, Jul 18, 2013 at 3:30 PM, Thomas Broyer <t.br...@gmail.com> wrote:
On Thursday, July 18, 2013 3:21:59 PM UTC+2, RyanZA wrote:Jens, even with source maps in Chrome, I've been unable to get stack traces to work. They still print out poorly in production when an exception is hit - the exceptions ignore the source maps entirely. I asked previously if there is a way around it, but apparently it's a known issue - so I don't think SourceMaps solve this problem yet.That said, the size and speed overhead here is terrible and most people would avoid something that adds that much overhead in production (although it would be great in development).What GWT needs here is something closer to what you get with proguard - a mapping file created during compilation that could be used to run the obfuscated/javascript exception through a utility to give the correct stack trace with zero overheads.I'm not entirely sure on how proguard accomplishes it, but I'd say it would be the perfect solution.This is what the StackTraceDeobfuscator does already. It's currently based on symbolMaps (GWT-specific) rather than source maps though.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/1qDVlPGryKo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsub...@googlegroups.com.
What GWT needs here is something closer to what you get with proguard - a mapping file created during compilation that could be used to run the obfuscated/javascript exception through a utility to give the correct stack trace with zero overheads.I'm not entirely sure on how proguard accomplishes it, but I'd say it would be the perfect solution.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
Looking at the donations made so far and obviously at first glance it doesn't look like this work has the significance to many that one might expect. I really feel like the amount of work, complexity of the issue at hand and the overall contribution of the work made by +Alex
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
I got a tweet from you asking for a donation (or rather a 'partner', which apparently means 'money'), but couldn't frame a useful response in 140 chars, so since this thread is coming back, I thought to do so here instead.
What license are you offering these code samples under - if it isn't something open and available, what is the benefit to an advance copy of the jar if I, an author of a library and several open source tools and applications, cannot provide it to my customers or other downstream users?
We've found that https://gist.github.com/niloc132/3906501 goes a heck of a long ways toward offering optional debug info - if not enabled, the user gets the normal-size application with zero size or performance hit, and by redirecting to a slightly different url, the full trace info can be pulled out (with the quirks you mention of course*), which typically goes a long ways toward identifying the real issue.
* How often have you needed to know which line of Impl.java or DOMImpl.java a stack trace intersects? To make your case more effectively, you might consider using code where it is meaningful to see those lines, something other than the equivelent of java.lang.reflect.Method.invoke(Method.java:601). Perhaps some real life JSNI, or an annoying IE6-9 focus() or setAttribute issue?
You touch briefly on the risk of '[exposing] your application’s implementation details', but unless I am mistaken, the extra metadata included in the file:line ints should still be enough to take apart an app and map it to discrete files and reconstruct methods, even un-inlining (as you mention) to pull out clearer details. My understanding was that the premise of the sourceMap was to work entirely from the stack to allow the actual source to be obfuscated, and avoid any other metadata from being left in the compiled output. Combine this with the fact that many of those classes are publicly available (GWT itself, etc), and it seems that you could reverse out a significant portion of the app - the "secret sauce". Can you comment on using this for public applications and any reverse engineering attempts you've made?