Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Change to ListGrid 12th to 13th June 2014 that breaks setSort() in Dev Mode only

    Hi Isomorphic,

    I noted that my code does not work any more with today's (v9.1p_2014-06-17/EVAL Deployment) version and tried to create a simple standalone Testcase, but did not succeed.

    I tried then to find out at which day the change that broke my code was introduced and tracked it down to the change from v9.1p_2014-06-12 to v9.1p_2014-06-13.

    The error I get in FF26 Dev Mode in Eclipse Development Mode Tab (using GWT 2.6.1) is the following (note that it only happens in dev mode, not deployed and that I can't see it in SmartGWT's Developer Console as it pops up right at start before I can open the console):
    Code:
    [ERROR] [lms] - Uncaught exception escaped
    
    19:42:21.462 [ERROR] [lms] Uncaught exception escaped
    
    [B]java.lang.ClassCastException: Cannot cast com.google.gwt.core.client.JavaScriptObject$ to [Lcom.google.gwt.core.client.JavaScriptObject;
    [/B]    at java.lang.Class.cast(Unknown Source)
        at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:169)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
        at [B]com.smartgwt.client.widgets.grid.ListGrid.setSort(ListGrid.java)[/B]
        at com.lmscompany.lms.client.list.LeadlistManagement.configure(LeadlistManagement.java:231)
        at com.lmscompany.lms.client.list.LeadlistManagement.<init>(LeadlistManagement.java:195)
        at com.lmscompany.lms.client.menu.toptabs.LeadMangementVLayout.<init>(LeadMangementVLayout.java:72)
        at com.lmscompany.lms.client.menu.navigation.MainArea.openModule(MainArea.java:142)
        at com.lmscompany.lms.client.ui.button.NavigationButtonField.click(NavigationButtonField.java:122)
        at com.lmscompany.lms.client.menu.navigation.NavigationVLayout.createStandardButtons(NavigationVLayout.java:88)
        at com.lmscompany.lms.client.menu.navigation.NavigationVLayout.<init>(NavigationVLayout.java:65)
        at com.lmscompany.lms.client.Lms$MainLayout.<init>(Lms.java:102)
        at com.lmscompany.lms.client.Lms$3.execute(Lms.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
        at java.lang.Thread.run(Unknown Source)
    The line triggering the error is:
    Code:
    [B]setSort(new SortSpecifier[] { new SortSpecifier("CAMPAIGN_ID", SortDirection.ASCENDING) });[/B]
    I know that this is not a report as you like it, bit right now I can't provide more. Perhaps you can find the root cause easily because of the date it broke.
    It might be related to this thread because of the date, the dev-mode-only and problem area ("JavaScriptObject").

    Thank you & Best regards,
    Blama

    #2
    That looks like a bogus error, and the changes on this day don't seem like they have possible affect the area of the code where you're seeing an issue reported.

    Have you already tried clearing your GWT unitCache, re-running a GWT compile, restarting the IDE, reinstalling GWT itself? This kind of procedure helps to clear out any kind of corrupted data that might have built up related to GWT / the GWT compiler.

    Comment


      #3
      Hi Isomorphic,

      I did clear unitCache and run GWT compile before. Now I also exited Eclipse and switched back to GWT 2.6.0 (from 2.6.1).
      The problem is 100% reproducible on my site. June, 12th, and before work, June, 13th, and after don't.

      It might also be related to this change you made, as this is directly affecting setSort() and has the matching date.

      Best regards,
      Blama

      Comment


        #4
        Hi,

        Same error here. We face this since integration of SmartGWT Power nightly 2014-06-14.
        One of our developer still runs 2014-06-10 and doesn't suffer the issue.

        Clearly looks like a regression.

        Regards
        Antoine

        Comment


          #5
          A fix is being worked on. In the meantime, it should be noted that the only situation where this exception occurs is where setSort() is called before the JS widget is created. A workaround is thus to call setInitialSort() at those locations where setSort() is encountering the exception.

          Comment


            #6
            The fixes should be in today's builds of SGWT 5.0d and 4.1p.

            Comment


              #7
              Hi Isomorphic,

              your change fixed the issue for me, thanks a lot.
              Could you elaborate on the difference of:

              setInitialSort() / setSort() (perhaps in the docs itself)

              setInitialCriteria(), similar from the name, seems to be only used when using no separate fetch, but setAutoFetchData(true), according to the javadocs.

              Best regards,
              Blama

              Comment

              Working...
              X