Class: com.google.gwt.core.client.JavaScriptException
Message:
(TypeError): Result of expression 'a' [null] is not an object.
line: 1513
sourceId: 4996591080
sourceURL: http://worm:8080/myShopInstall/gwt-results-app/F89E790362E6204FFEC75F28511A554C.cache.html
expressionBeginOffset: 18437
expressionCaretOffset: 18438
expressionEndOffset: 18440
I am unsure as to how I can trace or otherwise diagnose the cause, as
this seems to be impossible to catch using the usual Java tools (try/
catch).
Any suggestions?
Regards,
Anders
Im not sure where in eclipse to set "style=DETAILED" and even if I
did, is there a firebug dev tool for debugging javascript in IE?
I dont mind taking some time to figure out how to set the
"style=DETAILED", but only if there is some way to debug the problem
once ive done it!
Thanks,
John
On Jan 15, 2:39 pm, LEDUQUE Mickaël <mledu...@gmail.com> wrote:
> Y(ou'll probably only have this kind ofexceptioninjavascript
> compiled app, so you won't be able to use hosted/devmode to inspect
> it. I'd probably compile the application with style=DETAILED and use
> tools like firebug (Firefox) or webkit developer tools (chrome/safari)
> todebugthat.
> Of course, if this really is a big application, it may take some
> resources to trace into DETAILEDjavascript(I know for example
In web mode I have encountered a few of these as well. Here is our
approach:
1. Maintain a global action list which tracks most (e.g. Actions.add
("actionname"))
2. In your uncaught exception handler, pull in the action list and
send that back to the server which then logs the result and sends
emails etc.
We also send back the entire page dom structure as an attachment to
the email so we can take a look at the data on the page at the time of
the error.
This has enabled us to find out which customer, what they were doing
and the timing of what they did - then we can easily replicate it in
devmode.
Hope this helps
On Jan 15, 10:45 pm, dduck <anders.johansen.a...@gmail.com> wrote:
> In a relatively large project I sometimes get this exception:
>
> Class: com.google.gwt.core.client.JavaScriptException
> Message:
> (TypeError): Result of expression 'a' [null] is not an object.
> line: 1513
> sourceId: 4996591080
> sourceURL:http://worm:8080/myShopInstall/gwt-results-app/F89E790362E6204FFEC75F...
Any clues as to how I do that?
Regard,
Anders
After a few hours of this, I finally narrowed it down to the following
(and similar) line of code:
daygrid.getColumnFormatter().setWidth(col, "0px");
As soon as I set this to "1px" rather than "0px" the javascript error
went away.
for you dduck, the way forward would be to do as leduque suggests
above and set the compile time flag for style to "detailed" and that
should give you a much better idea where the error is, you might find
the following link useful:
http://code.google.com/webtoolkit/doc/1.6/FAQ_DebuggingAndCompiling.html#Why_is_my_GWT-generated_JavaScript_gibberish?
Id still like to know how to set this setting via eclipse, which im
sure is very simple for someone who knows!
Thanks,
John
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
On 21 Jan., 15:44, John V Denley <johnvden...@googlemail.com> wrote:
> for you dduck, the way forward would be to do as leduque suggests
> above and set the compile time flag for style to "detailed" and that
> should give you a much better idea where the error is, you might find
> the following link useful:http://code.google.com/webtoolkit/doc/1.6/FAQ_DebuggingAndCompiling.h...
I have done so, but the debugging still points to a piece of
JavaScript that does not have a clear correspondence to the original
Java code :(
Regards,
Anders
On 26 Jan., 13:11, dduck <anders.johansen.a...@gmail.com> wrote:
> I have done so, but the debugging still points to a piece of
> JavaScript that does not have a clear correspondence to the original
> Java code :(
Specifically it points to this line:
function Y$(a){var b;if(a.Z()){return KK(new IK,Wob)}else{b=lJ(new
fJ,Ohb+a._()+Xob);b.d=true;oJ(b,vV(new _$,a));return b}}
The error is: "java.lang.IndexOutOfBoundsException: Can't get element
58"
Regards,
Anders
Class: com.google.gwt.core.client.JavaScriptException
Message:
(TypeError): Result of expression 'a' [null] is not an object.
line: 1520
sourceId: 4968015904
sourceURL: http://worm:8080/myShopInstall/gwt-results-app/5DF30FE3D0E594F4B64889C27BA79632.cache.html
expressionBeginOffset: 18742
expressionCaretOffset: 18743
expressionEndOffset: 18745
Line 1520 in the file looks like this:
function ZF(a){var b;b=PP(new MP,a.g);while(b.b<b.c.d-1){RP(b);TP(b)}}
On Jan 26, 6:55 am, dduck <anders.johansen.a...@gmail.com> wrote:
> ...and another, this time the one I am actually after:
>
> Class: com.google.gwt.core.client.JavaScriptException
> Message:
> (TypeError): Result of expression 'a' [null] is not an object.
> line: 1520
> sourceId: 4968015904
> sourceURL:http://worm:8080/myShopInstall/gwt-results-app/5DF30FE3D0E594F4B64889...
On 26 Jan., 16:15, Djabi <george.djaba...@gmail.com> wrote:
> BTW, Your code stills looks like compiled with -style obfuscated.
You are right.
Thought I had fixed it, but hadn't.
Here is the unobfuscated code:
function com_google_gwt_user_client_ui_Panel_
$clear__Lcom_google_gwt_user_client_ui_Panel_2V(this$static){
var it;
it = com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_
$WidgetCollection
$WidgetIterator__Lcom_google_gwt_user_client_ui_WidgetCollection
$WidgetIterator_2Lcom_google_gwt_user_client_ui_WidgetCollection
$WidgetIterator_2(new com_google_gwt_user_client_ui_WidgetCollection
$WidgetIterator, this
$static.com_google_gwt_user_client_ui_ComplexPanel_children);
while (it.com_google_gwt_user_client_ui_WidgetCollection
$WidgetIterator_index <
it.com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_this
$0.com_google_gwt_user_client_ui_WidgetCollection_size - 1) {
com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_
$next__Lcom_google_gwt_user_client_ui_WidgetCollection
$WidgetIterator_2Lcom_google_gwt_user_client_ui_Widget_2(it);
com_google_gwt_user_client_ui_WidgetCollection$WidgetIterator_
$remove__Lcom_google_gwt_user_client_ui_WidgetCollection
$WidgetIterator_2V(it);
}
}
Error points to line starting with "it = com_google<..>"
Error message is:
"(TypeError): Result of expression 'this$static' [null] is not an
object."
On 26 Jan., 20:51, John Denley <johnvden...@googlemail.com> wrote:
> This is beyond anything Ive come across before, sorry I cant help anymore,
> though it looks like i did manage to push you in the right direction!....
>
> good luck figuring it out...
I finally did.
The root cause was a programming error on my behalf, where an object
might be null if some methods were invoked in the wrong order. This
introduced a nasty timing-dependant error.
The actual subject of mu posting is still unresolved, however: It is
very hard to figure out the area of the original Java code responsible
for an exception thrown at runtime. I understand that a better stack
trace mechanism is in the works, but obviously it is not yet part of
the production branch of GWT. In the mean time we are left to our most
ancient tools, the printf and our naked brain :)
Regards, and thanks for the help all
Anders
On 27 Jan., 10:07, dduck <anders.johansen.a...@gmail.com> wrote:
> I understand that a better stack
> trace mechanism is in the works, but obviously it is not yet part of
> the production branch of GWT. In the mean time we are left to our most
> ancient tools, the printf and our naked brain :)
Turns out it is in the production branch, only not as a default.
To enable, add these two lines to the module file:
<set-property name="compiler.emulatedStack" value="true"/>
<set-configuration-property
name="compiler.emulatedStack.recordFileNames" value="true"/>
This will enable stack traces on this format:
<...>
Unknown.Hh(JsArrayString.java:42)
Unknown.Pf(StackTraceCreator.java:366)
Unknown.IN(SpinnerWhileRequestingViewer.java:129)
Unknown.CL(TrappableCommand.java:35)
Unknown.iL(TrappableCommand.java:24)
Unknown.Zw(CommandExecutor.java:310)
Unknown.mx(Duration.java:29)
Unknown.lf(Timer.java:141)
Unknown.anonymous(Timer.java:60)
Unknown.Tg(Impl.java:146)
Unknown.anonymous(Impl.java:56)
<...>
These stack traces would have saved me at least a man week, if only I
had known. Guess you have to R *all* TFM to be sure :D
Regards,
Anders