[gwt-contrib] Vaadin and GWT 2.7 compilePerFile

2014-09-10 Thread Artur Signell
Hi,

There is some issue with -XcompilerPerFile and the generators used in Vaadin. 
There was a problem with  "stale types" previously, but this was fixed a while 
back. Today you consistently get a ClassCastException after the first partial 
recompilation.
SEVERE: undefinedjava.lang.ClassCastException
at Unknown.Throwable_1_g$(com.vaadin.DefaultWidgetSet-0.js@8:8546)
at Unknown.Exception_1_g$(com.vaadin.DefaultWidgetSet-0.js@18:8704)
at Unknown.RuntimeException_1_g$(com.vaadin.DefaultWidgetSet-0.js@18:8745)
at Unknown.ClassCastException_1_g$(com.vaadin.DefaultWidgetSet-0.js@25:154772)
at Unknown.dynamicCast_0_g$(com.vaadin.DefaultWidgetSet-0.js@11:600)
at Unknown.createWidget_0_g$(com.vaadin.DefaultWidgetSet-0.js@12:102047)
at Unknown.getWidget_7_g$(com.vaadin.DefaultWidgetSet-0.js@29:102094)
I don't have any good way of extracting a small test case so I created 
https://code.google.com/p/google-web-toolkit/issues/detail?id=8880 already a 
while back with instructions on how it can be reproduced using the Vaadin 
project. 

Would be great to get this sorted out before GWT 2.7 - is there anything I can 
do to help getting this forward?

- Artur
-- 
Artur Signell, CTO
Vaadin.com - +358 40 567 0089 - Skype:artursignell

-- 
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-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CBDB0261-D4A0-470B-8538-089C89F1D598%40vaadin.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: SDM "-XcompilePerFile": initial feedback

2014-09-10 Thread Jens

>
> This sounds like it might be a deadlock. Could you jstack to get a thread 
> dump of the running process? It should tell us where it's stuck.
>

Yeah it is a deadlock: http://pastebin.com/WCVZc21E

-- J.

-- 
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-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/ed4b5840-b7fa-4904-b138-c2f5c82a3c97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: SDM "-XcompilePerFile": initial feedback

2014-09-10 Thread Jens

>
> Yeah it is a deadlock: http://pastebin.com/WCVZc21E
>

Hmm although it is not a java level dead lock. Seems like GWT can not close 
a jar file? Strange.

-- J.

-- 
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-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/b0b2069b-1e01-4df5-9a70-cb39f55a8694%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: SDM "-XcompilePerFile": initial feedback

2014-09-10 Thread Jens

>
> Yeah it is a deadlock: http://pastebin.com/WCVZc21E
>>
>
> Hmm although it is not a java level dead lock. Seems like GWT can not 
> close a jar file? Strange.
>

Ok we just solved it. The Java run configuration had a VM parameter 
"-XstartOnFirstThread" and when removing it the CodeServer works as 
expected. The colleague copied that parameter from his classic DevMode "Web 
Application" run configuration.

It seems like that Eclipse adds this parameter automatically on Mac OS when 
creating a new "Web Application" run configuration (provided by GPE). That 
means most DevMode run configurations have that parameter set. This might 
affect the new -superDevMode feature of GWT 2.7 as well.

Maybe you can try to reproduce the issue by using Mac OS and adding the VM 
parameter "-XstartOnFirstThread" to "CodeServer" and "DevMode 
-superDevMode". We attached a debugger to CodeServer and the thread that 
hangs wants to close an input stream of the jar url connection 
gwt-user.jar!/.../disclosurePanelClosed.png. So to reproduce it your demo 
project should probably use a DisclosurePanel. If you can reproduce it, it 
might be a good idea to mention that behavior for Mac OS users in the 2.7 
release notes.

-- J.

-- 
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-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/e0986157-9395-4f0d-ae01-d4e3a001bf2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: SDM "-XcompilePerFile": initial feedback

2014-09-10 Thread Jens

>
> I've fixed two Gin generator related breakages like this so far. Are you 
> sure this is occurring with HEAD? If so then there's definitely a bug in 
> the "stale types marking" code that needs finding. If you can make a repro 
> case I'll figure it out.
>

Hey John, I have to say that we still see issues with UiBinder + 
compilePerFile in GWT trunk from 09.09.2014. We have a UiBinder Composite, 
lets call it "MyComposite", that has 

 ... some css 
...  

in its XML file and

interface Style extends CssResource {
  
}

@UiField
Style style;

in the corresponding Java class. This MyComposite is used in a different 
Composite (GenericCustomComposite) that has a sub class 
(SpecificCustomComposite).

If we add a new accessor method to the Style interface of MyComposite then 
compilation still works but the app fails at runtime with:

com.google.gwt.core.client.JavaScriptException: (TypeError) : undefined is 
not a function
at Unknown.UIObject_1_g$(app-0.js@10:19605)
at Unknown.Widget_1_g$(app-0.js@19:20155)
at Unknown.Composite_1_g$(app-0.js@17:109460)
at Unknown.GenericCustomComposite_1_g$(app-0.js@20:479016)
at Unknown.SpecificCustomComposite_1_g$(app-0.js@23:477194)
at Unknown.generateUiEntries_0_g$(app-0.js@29:221296)
at Unknown.setData_0_g$(app-0.js@14:221535)
at Unknown.success_60_g$(app-0.js@25:221911)
at Unknown.success_61_g$(app-0.js@10:221921)
at Unknown.onSuccess_7_g$(app-0.js@10:213650)

So instantiating of SpecificCustomComposite (whose super class uses the 
modified MyComposite) fails. I debugged it a bit with the following 
information (some stuff renamed):

function SpecificCustomComposite_1_g$(param1_0_g$, param2_0_g$, param3
_0_g$){
  try {
$clinit_SpecificCustomComposite_0_g$();
// Here *"this" points to __proto__: F_0_g$* which contains all the 
methods 
// of SpecificCustomComposite_1_g as well as *$init_13782_g$()* called 
below.
GenericCustomComposite_1_g$.call(*this*, param1_0_g$, param2_0_g$);
*this.$init_13782_g$();*
this. param3_1_g$ = param3_0_g$;
  }
   catch (e_0_g$) {
throw e_0_g$;
  }
}


function GenericCustomComposite_1_g$(param1_0_g$, param2_0_g$){
  try {
$clinit_GenericCustomComposite_0_g$();
var someVar_0_g$;
// Here *"this" still points to __proto__: F_0_g$ *which contains all 
the methods
// of SpecificCustomComposite_1_g as well as *$init_13782_g$()*.
Composite_1_g$.call(*this*);
*this.$init_13781_g$(); // technically the correct init method but 
"this" does not have it.*
 
this.initWidget_3_g$(this.container_66_g$);
  }
   catch (e_0_g$) {
throw e_0_g$;
  }
}

function Composite_1_g$(){
  try {
$clinit_Composite_0_g$();
*// "this" is still the same F_0_g$*
Widget_1_g$.call(this);
*this.$init_10766_g$(); **// technically the correct init method but 
"this" does not have it.*
  }
   catch (e_0_g$) {
throw e_0_g$;
  }
}

function Widget_1_g$(){
  try {
$clinit_Widget_0_g$();
*// "this" is still the same F_0_g$*
UIObject_1_g$.call(this);
*this.$init_10009_g$(); // technically the correct init method but 
"this" does not have it.*
  }
   catch (e_0_g$) {
throw e_0_g$;
  }
}

function UIObject_1_g$(){
  try {
$clinit_UIObject_0_g$();
*// "this" is still the same F_0_g$*
Object_1_g$.call(this);
*this.$init_10008_g$(); **// causes undefined error because "this" does 
not contain the init method of UIObject*
  }
   catch (e_0_g$) {
throw e_0_g$;
  }
}

So it seems like the "this" pointer somehow gets messed up after recompile.

The try/catch block in all these code blocks above are from our custom GWT 
build as we need to disable JIT on safari permutation (iOS 6.x JIT bugs) 
and wrapping everything with try/catch was the safest solution so far (even 
though it is not nice). To do so we have a custom Visitor in 
JavaToJavaScriptCompiler.PermutationCompiler.compilePermutation() that 
executes between calls to optimizeJs() and JsStackEmulator.exec(). 


Maybe this info helps you to spot the issue.


-- J.

-- 
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-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/931e7562-ee5d-41a6-a41c-2ab70b4bcabd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Vaadin and GWT 2.7 compilePerFile

2014-09-10 Thread 'John Stalcup' via GWT Contributors
Ah, i didn't see that bug report. Thanks. Taking a look.

On Wed, Sep 10, 2014 at 12:36 AM, Artur Signell  wrote:

> Hi,
>
> There is some issue with -XcompilerPerFile and the generators used in
> Vaadin. There was a problem with  “stale types” previously, but this was
> fixed a while back. Today you consistently get a ClassCastException after
> the first partial recompilation.
>
> SEVERE: undefinedjava.lang.ClassCastException
> at Unknown.Throwable_1_g$(com.vaadin.DefaultWidgetSet-0.js@8:8546)
> at Unknown.Exception_1_g$(com.vaadin.DefaultWidgetSet-0.js@18:8704)
> at Unknown.RuntimeException_1_g$(com.vaadin.DefaultWidgetSet-0.js@18:8745)
> at Unknown.ClassCastException_1_g$(com.vaadin.DefaultWidgetSet-0.js@25:154772)
> at Unknown.dynamicCast_0_g$(com.vaadin.DefaultWidgetSet-0.js@11:600)
> at Unknown.createWidget_0_g$(com.vaadin.DefaultWidgetSet-0.js@12:102047)
> at Unknown.getWidget_7_g$(com.vaadin.DefaultWidgetSet-0.js@29:102094)
>
> I don’t have any good way of extracting a small test case so I created
> https://code.google.com/p/google-web-toolkit/issues/detail?id=8880 already
> a while back with instructions on how it can be reproduced using the Vaadin
> project.
>
> Would be great to get this sorted out before GWT 2.7 - is there anything I
> can do to help getting this forward?
>
> - Artur
> --
> Artur Signell, CTO
> Vaadin.com - +358 40 567 0089 - Skype:artursignell
>
>  --
> 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-contributors+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-web-toolkit-contributors/CBDB0261-D4A0-470B-8538-089C89F1D598%40vaadin.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAFw3gJ8%2BO5xoG3q6MU6Rdwkf3OdDQAuy4yFiOnivC%2B3qJQ_CJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] -XcompilePerFile feedback

2014-09-10 Thread Julien Dramaix
Hi John,

I'm currently on holidays and I was not able to reproduce the two others
bugs before my departure so I guess they were fixed.

Both concerned generators.  The first one was with restygwt. If you
modified the structure of a class sent to the wire and recompiled the
application,  the reference to the generated serializer was not found
anymore.

The second one concerned GIN. Consider two classes A and B.  A is
injectable with Gin and create a instance of the class B with the new
operator.  Make the class B injectable and use a Provider to get an
instance of the class B in class A instead of using the new operator.
Recompile and you get an error (at least I got an error three weeks ago)

On Sep 8, 2014 2:46 PM, "'John Stalcup' via GWT Contributors" <
google-web-toolkit-contributors@googlegroups.com> wrote:
>
> You had mentioned that you'd seen two other issues as well but hadn't
gotten around to making a repro case.
>
> Are these issues still around? Thanks for the two repro cases you've
already supplied. They were very helpful.
>
> John
>
>
> On Wed, Sep 3, 2014 at 7:06 PM, John Stalcup  wrote:
>>
>> Thanks for the repo update.
>>
>> This is fixed now (https://gwt-review.googlesource.com/#/c/9004/)
>>
>>
>> On Wed, Sep 3, 2014 at 1:15 AM, Julien Dramaix 
wrote:
>>>
>>> Sorry I had forgot to push my last change. The file is there now.
>>>
>>>
>>> On Wed, Sep 3, 2014 at 2:51 AM, 'John Stalcup' via GWT Contributors <
google-web-toolkit-contributors@googlegroups.com> wrote:

 I don't see style.gss in the repo.


 On Fri, Aug 29, 2014 at 2:45 PM, Julien Dramaix <
julien.dram...@gmail.com> wrote:
>
> Dear GWT team,
>
> I'm now using the GWT 2.7 snapshot and I'm testing the "per file"
compilation and I found one issue.
>
> Consider a UiBinder template using an external ClientBundle
containing a GssResource. If you change something on the .gss file and hit
the button to recompile the application. The application fails to run with
this error:
> Uncaught com.google.gwt.event.shared.UmbrellaException: Exception
caught: Exception caught: (ReferenceError) :
HomePageView_BinderImpl$Widgets_1_g$ is not defined
>
> To reproduce this error, use this small application:
https://github.com/jDramaix/gwtpgwt27, change something in
the file be/jdramaix/test/client/resources/style.gss and recompile the
application.
>
> I found also two others issues, but I was not able to reproduce them
with the simple application. I will try to investigate Monday in order to
get you an example.
>
> Julien
>
> --
> 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-contributors+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CABb_3%3D63%3D4dAGGLf3M-izC55GmE4Lr7i50FxW408Ye6P5G8JzQ%40mail.gmail.com
.
> For more options, visit https://groups.google.com/d/optout.


 --
 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-contributors+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAFw3gJ-z8mfPgytZQzPUYNVzb1JBP7yw4KRYGmqs5_HtrmXUAA%40mail.gmail.com
.

 For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> 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-contributors+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CABb_3%3D7AqA9ahHt4vmF1kVDAcjwDkHS4buFWFMrQnscEf8UDrQ%40mail.gmail.com
.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>
> --
> 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-contributors+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAFw3gJ9xrZ8N5NpJESKyLE1sropX8xrJbmVBLU2r125nZnu_dQ%40mail.gmail.com
.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
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-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/goo