Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-27 Thread dduck


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

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-26 Thread dduck


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

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-26 Thread dduck


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

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-26 Thread dduck
...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/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.bb.c.d-1){RP(b);TP(b)}}

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-26 Thread Djabi
BTW, Your code stills looks like compiled with -style obfuscated.

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...
 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.bb.c.d-1){RP(b);TP(b)}}

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-26 Thread dduck


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.

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-26 Thread John Denley
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...

2010/1/26 dduck anders.johansen.a...@gmail.com



 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.

 --
 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-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-21 Thread John V Denley
I have a similar problem with a compiled GWT javascript, but it only
fails in IE.

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
 Firebug has some problems with really big js files).
-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-21 Thread Joe Cole
This can happen in devmode. I found one today - it was an exception in
a deferred command while manipulating an xml document.
To debug in devmode is relatively easy - simply debug before it breaks
and step through.

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...
 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
-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-21 Thread dduck
Well, using Safari I can now spot the place where the exception is
thrown in the generated JavaScript, but I have no way to relate that
to the Java code that I put into the GWT compiler.

Any clues as to how I do that?

Regard,
  Anders
-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-21 Thread John V Denley
I finally bit the bullet, and started commenting out huge chunks of my
code, and running the application to see if that got rid of the
problem...

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


On Jan 21, 2:14 pm, dduck anders.johansen.a...@gmail.com wrote:
 Well, using Safari I can now spot the place where the exception is
 thrown in the generated JavaScript, but I have no way to relate that
 to the Java code that I put into the GWT compiler.

 Any clues as to how I do that?

 Regard,
   Anders
-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-21 Thread g p
When you press the compile button in Eclipse, there is a drop down menu
called: Output Style. One of the options there is the detailed. I suppose
that would do the trick ...

2010/1/21 John V Denley johnvden...@googlemail.com

 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-web-tool...@googlegroups.com.

To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-21 Thread John Denley
I dont get that option, where is this compile button you refer to? I
always use the run as, there is a Compile GWT project under that, but it
doesnt give me any options, it just starts compiling!

Incidentally, I have now deployed this fixed for IE version, and online,
it doesnt work, even though locally it works fine! sigh.

2010/1/21 g p ghost...@gmail.com

 When you press the compile button in Eclipse, there is a drop down menu
 called: Output Style. One of the options there is the detailed. I suppose
 that would do the trick ...

 2010/1/21 John V Denley johnvden...@googlemail.com

 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-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 

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-web-tool...@googlegroups.com.

To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What causes com.google.gwt.core.client.JavaScriptException, and how to trace it?

2010-01-15 Thread LEDUQUE Mickaël
Y(ou'll probably only have this kind of exception in javascript
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)
to debug that.
Of course, if this really is a big application, it may take some
resources to trace into DETAILED javascript (I know for example
Firebug has some problems with really big js files).
-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.