Announcement

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

    Was a Bug introduced and fixed recently in the area of ListGrid setSort()?

    Hi Isomorphic,

    I have a version deployed which seems to have bug that I fixed now. Could you just confirm that there was some change and it is working as expected now?
    My users hit it, not me, so this isn't very fortunate for me.
    • Last working version: ? (I'd guess something like end April)
    • Version with bug: v10.0p_2015-05-14
    • Fixed as it seems: v10.0p_2015-05-21 (I did not check versions in between)


    I get this error, which unfortunately does not say much (Eclipse GWT DevMode log):
    Code:
    16:25:31.609 [ERROR] [lms] Uncaught exception escaped
    
    com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(170), JavaScript object(154), JavaScript object(616)]): this.getField(...) is null
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:137)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:589)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
        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:299)
        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:72)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:296)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:551)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
    This is, if it happens at startup.
    If it does happen later, I get this Developer Console log, which might help you:
    Code:
    16:42:02.882:MUP2[E0]:WARN:Log:Uncaught JavaScript exception: TypeError: this.getField(...) is null in http://localhost:8080/lms/lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-14.js, line 2613
    In my application I persist sorting in the DB an re-apply on re-login with listgrid.setSortState(). If there is data, it works:
    If there is no data, I apply default-sorting:
    Code:
    setSort(new SortSpecifier[] { new SortSpecifier(campaignLGF.getName(), SortDirection.ASCENDING) });
    This causes the error.

    Have there been changes in this area recently? Should be everything good now, again? For me, it seems so, but if you have an advice, what to double check, I'll happily do that.

    Best regards
    Blama

    #2
    I too have been seeing this same issue as well, in the 5.1d builds. I tried the 5.1d build from 2015-05-21 and it's still has this issue.
    In my particular case I'm calling setInitialSort(SortSpecifier[]) instead of setSort(), if this makes any difference.

    Comment


      #3
      No, this doesn't look like any of the recent 5.0 bug fixes.

      As far as possibly hitting this in *current* 5.1d builds, a first step is to use the instructions in the FAQ & Debugging topic to get a clear stack trace.

      Comment


        #4
        Hi Isomorphic,

        there is definitely something going on here (using v10.0p_2015-05-21 deployed in FF26):

        Code:
        15:21:27.808:TMR9:WARN:Log:Uncaught JavaScript exception: TypeError: _19.indexOf is not a function in http://localhost:8080/lms/lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js, line 204
        15:21:27.835:TMR3:WARN:Log:TypeError: _19.indexOf is not a function
        Stack from error.stack:
            unnamed() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:204
            Arra.sortByProperties/_40() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1098
            Arra.sortByProperties() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1099
            Arra.setSort() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1075
            Tree.getChildren() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:107
            Tree.getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:175
            Tree.getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:176
            Tree._getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:187
            Tree.get() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:189
            ListGrid.getCellRecord() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:2305
            anonymous() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:78
            GridRenderer.mouseMove() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:651
            Canvas.handleMouseMove() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2820
            [c]EventHandler.bubbleEvent() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1570
            EventHandler.._handleMouseMove() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1402
            EventHandler._handleMouseMove() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1387
            EventHandler._delayedMouseMove() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1387
            [c]Class.fireCallback() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:291
            Timer._fireTimeout() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1292
            Timer.setTimeout/_6<() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1290
        Does this already help?
        It is a grouped ListGrid with 4 rows (1st group 1 member, 2nd group 3 members), setSortByGroupFirst(true), no setGroupSortDirection() and setSortState().

        Effects are:
        • groupSortDirection is only changed on some field-sort direction change
        • After some time and clicking, the ListGrid breaks (one data column styled like group column and vice versa)
        • ListGrid.invalidateCache() succeeds, but the ListGrid displays the spinning wheel all the time.


        I'll try to generate a testcase based on this.

        Best regards
        Blama

        Comment


          #5
          Still no testcase, but I noticed that I have more information available in the GWT popup in FF26 dev mode than in the SmartGWT Developer Console or in the Development Mode tab in Eclipse. See screenshot. Perhaps some null-check is missing with respect to selectedState?

          The SmartGWT Developer Console and the Development Mode tab in Eclipse are spammed with this error messages:

          SmartGWT Developer Console
          Code:
          15:07:36.715:TMR0:WARN:Log:Uncaught JavaScript exception: TypeError: _19.indexOf is not a function in http://localhost:8080/lms/lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js, line 202
          15:08:43.571:TMR6:WARN:Log:TypeError: _19.indexOf is not a function
          Stack from error.stack:
              unnamed() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:202
              Arra.sortByProperties/_40() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1098
              Arra.sortByProperties() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1099
              Arra.setSort() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1075
              Tree.getChildren() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:107
              Tree.getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:175
              Tree.getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:176
              Tree._getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:187
              Tree.get() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:189
              Tree.getCachedRow() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:189
              ListGrid._getCachedCellRecord() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:2308
              GridBody.redraw() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:794
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:292
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              ListGrid.layoutChildren() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:1255
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:330
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:330
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.moveBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2429
              Canvas.moveTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2454
              Canvas.setRect() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2235
              Canvas._resolvePercentageSize() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2524
              Canvas.pageResize() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2453
              [a]MathFunction.invokeSuper() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:282
              [a]MathFunction.Super() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:274
              Layout.pageResize() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:354
              [c]Page.handleEvent() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1303
              EventHandler._fireResizeEvent() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1635
              EventHandler._pageResize() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1635
              anonymous() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:77
              [c]Class.fireCallback() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:291
              Timer._fireTimeout() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1292
              Timer.setTimeout/_6<() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1290
          Development Mode tab in Eclipse 1/2:
          Code:
          15:08:43.585 [ERROR] [lms] 15:08:43.571:TMR6:WARN:Log:TypeError: _19.indexOf is not a function
          Stack from error.stack:
              unnamed() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:202
              Arra.sortByProperties/_40() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1098
              Arra.sortByProperties() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1099
              Arra.setSort() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1075
              Tree.getChildren() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:107
              Tree.getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:175
              Tree.getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:176
              Tree._getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:187
              Tree.get() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:189
              Tree.getCachedRow() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:189
              ListGrid._getCachedCellRecord() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:2308
              GridBody.redraw() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:794
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:292
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              ListGrid.layoutChildren() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:1255
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:330
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:330
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.moveBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2429
              Canvas.moveTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2454
              Canvas.setRect() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2235
              Canvas._resolvePercentageSize() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2524
              Canvas.pageResize() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2453
              [a]MathFunction.invokeSuper() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:282
              [a]MathFunction.Super() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:274
              Layout.pageResize() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:354
              [c]Page.handleEvent() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1303
              EventHandler._fireResizeEvent() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1635
              EventHandler._pageResize() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1635
              anonymous() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:77
              [c]Class.fireCallback() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:291
              Timer._fireTimeout() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1292
              Timer.setTimeout/_6&lt;() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1290
          
          
          com.smartgwt.client.core.JsObject$SGWT_WARN: 15:08:43.571:TMR6:WARN:Log:TypeError: _19.indexOf is not a function
          Stack from error.stack:
              unnamed() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:202
              Arra.sortByProperties/_40() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1098
              Arra.sortByProperties() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1099
              Arra.setSort() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1075
              Tree.getChildren() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:107
              Tree.getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:175
              Tree.getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:176
              Tree._getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:187
              Tree.get() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:189
              Tree.getCachedRow() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:189
              ListGrid._getCachedCellRecord() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:2308
              GridBody.redraw() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:794
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:292
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              ListGrid.layoutChildren() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:1255
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:330
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:330
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.resizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2472
              Canvas.resizeTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2485
              Layout.resizeMembers() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:291
              Layout.layoutChildren() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:333
              Canvas._completeResizeBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2474
              Canvas.moveBy() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2429
              Canvas.moveTo() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2454
              Canvas.setRect() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2235
              Canvas._resolvePercentageSize() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2524
              Canvas.pageResize() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:2453
              [a]MathFunction.invokeSuper() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:282
              [a]MathFunction.Super() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:274
              Layout.pageResize() @ lms/sc/modules/ISC_Foundation.js?isc_version=v10.0p_2015-05-21.js:354
              [c]Page.handleEvent() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1303
              EventHandler._fireResizeEvent() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1635
              EventHandler._pageResize() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1635
              anonymous() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:77
              [c]Class.fireCallback() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:291
              Timer._fireTimeout() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1292
              Timer.setTimeout/_6&lt;() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:1290
          
              at sun.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
              at java.lang.reflect.Constructor.newInstance(Unknown Source)
              at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
              at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
              at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
              at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:296)
              at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:551)
              at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
              at java.lang.Thread.run(Unknown Source)
          Development Mode tab in Eclipse 2/2:
          Code:
          15:08:43.668 [ERROR] [lms] 15:08:43.585:TMR6:WARN:Log:Uncaught JavaScript exception: TypeError: _19.indexOf is not a function in http://localhost:8080/lms/lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js, line 202
          
          com.smartgwt.client.core.JsObject$SGWT_WARN: 15:08:43.585:TMR6:WARN:Log:Uncaught JavaScript exception: TypeError: _19.indexOf is not a function in http://localhost:8080/lms/lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js, line 202
              at sun.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
              at java.lang.reflect.Constructor.newInstance(Unknown Source)
              at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
              at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
              at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
              at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:341)
              at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:222)
              at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:137)
              at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:589)
              at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:315)
              at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
              at com.smartgwt.client.util.SC.logWarn(SC.java)
              at com.smartgwt.client.util.LogUtil.handleOnError(LogUtil.java:35)
              at sun.reflect.GeneratedMethodAccessor109.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:72)
              at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
              at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:296)
              at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:551)
              at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
              at java.lang.Thread.run(Unknown Source)
          This is really important to me as it makes parts of my application unusable.

          Best regards
          Blama
          Attached Files

          Comment


            #6
            Hi Isomorphic,

            I tried all day to generate a testcase but had no success. I also can't get rid of the error in my application even when I make the offending field as simple as possible. It does NOT happen in GC42 and IE11, though.
            I exchanged the modules with debug-modules and get this exception in the Developer Console (using v10.0p_2015-05-21):
            Code:
            20:46:14.483:TMR3:WARN:Log:TypeError: first.indexOf is not a function
            Stack from error.stack:
                unnamed() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:5363
                .sortByProperties/compareNormalized() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:25971
                .sortByProperties() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:25996
                .setSort() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:25631
                .getChildren() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:3054
                .getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:4870
                .getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:4895
                ._getOpenList() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:5058
                .get() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:5156
                .getCachedRow() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:5161
                ._getCachedCellRecord() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:55322
                .redraw() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:19081
                .redrawChildren() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:52013
                ._updateHTML() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:51844
                .redraw() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:51779
                .invokeSuper() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:6375
                .redraw() @ lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js:32350
                .clearRedrawQueue() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:69699
                .fireCallback() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:6612
                ._fireTimeout() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:31221
                .setTimeout/tmrID<() @ lms/sc/modules/ISC_Core.js?isc_version=v10.0p_2015-05-21.js:31146
            
            20:46:14.485:TMR3:WARN:Log:Uncaught JavaScript exception: TypeError: first.indexOf is not a function in http://localhost:8080/lms/lms/sc/modules/ISC_Grids.js?isc_version=v10.0p_2015-05-21.js, line 5363
            Perhaps you can tell the difference from the IE/GC versions now that you know where it is happening (ISC_Grids.js:5363) and that it is not happening in IE/GC.

            I'll try more myself, but it would be really great if you could analyse the problem as well.

            Best regards
            Blama

            Comment


              #7
              Hi Isomorphic,

              I don't know if this helps, but please see the screenshots of the Firefox 26 Debugger before the exception happens.

              Can the fact that in picture Possibly_also_of_interest no sortNormalizer is set be correct?

              Best regards
              Blama
              Attached Files

              Comment


                #8
                Hi Isomorphic,

                I got it. Sorting by other fields helped to spot the difference. The field in question did not have type="integer" set.

                This was very hard to get for me. If the type field is that important, can't the DS-Loader complain about the absence of the attribute (either type or includeFrom must be set)?

                Best regards
                Blama

                Comment


                  #9
                  Field type is key if you expect certain behaviors like automatic validation as integer and for sorting and filtering to work as you'd expect.

                  However field type is not required, and omitting it causes a field to be treated as an unknown type, where most operations will operate similar to the "text" type but we will not assume the value *must* be text.

                  Regardless, we don't intend to have the sort-related code crash in this mode. Now that you know the underlying cause, can you show a test case that reproduces this crash?

                  Comment


                    #10
                    Hi Isomorphic,

                    please see this testcase:
                    BuiltInDS.java:
                    Code:
                    package com.smartgwt.sample.client;
                    
                    import com.google.gwt.core.client.EntryPoint;
                    import com.smartgwt.client.core.KeyIdentifier;
                    import com.smartgwt.client.data.DataSource;
                    import com.smartgwt.client.types.GroupStartOpen;
                    import com.smartgwt.client.util.PageKeyHandler;
                    import com.smartgwt.client.util.Page;
                    import com.smartgwt.client.util.SC;
                    import com.smartgwt.client.widgets.IButton;
                    import com.smartgwt.client.widgets.events.ClickEvent;
                    import com.smartgwt.client.widgets.events.ClickHandler;
                    import com.smartgwt.client.widgets.grid.ListGrid;
                    import com.smartgwt.client.widgets.layout.HLayout;
                    import com.smartgwt.client.widgets.layout.VLayout;
                    
                    public class BuiltInDS implements EntryPoint {
                    	private VLayout vL;
                    	private TestGrid tG;
                    	private HLayout hL;
                    
                    	public void onModuleLoad() {
                    		KeyIdentifier debugKey = new KeyIdentifier();
                    		debugKey.setCtrlKey(true);
                    		debugKey.setKeyName("D");
                    
                    		Page.registerKey(debugKey, new PageKeyHandler() {
                    			public void execute(String keyName) {
                    				SC.showConsole();
                    			}
                    		});
                    
                    		vL = new VLayout(5);
                    		vL.setPadding(20);
                    		vL.setWidth100();
                    		vL.setHeight100();
                    		tG = new TestGrid("setSortDesc");
                    
                    		hL = new HLayout(5);
                    		hL.setHeight(40);
                    		IButton reloadBtn = new IButton("Reload");
                    		reloadBtn.setWidth(150);
                    		reloadBtn.addClickHandler(new ClickHandler() {
                    			@Override
                    			public void onClick(ClickEvent event) {
                    				vL.removeChild(tG);
                    				tG.markForDestroy();
                    				tG = new TestGrid(null);
                    				vL.addMember(tG, 0);
                    			}
                    		});
                    
                    		hL.addMembers(reloadBtn);
                    		vL.addMembers(tG, hL);
                    		vL.draw();
                    	}
                    
                    	private class TestGrid extends ListGrid {
                    		public TestGrid(String mode) {
                    			super();
                    			setAutoFetchData(false);
                    			setGroupStartOpen(GroupStartOpen.ALL);
                    			setSortByGroupFirst(true);
                    			setDataSource(DataSource.get("animals"));
                    			fetchData();
                    		}
                    	}
                    }
                    animals.ds.xml:
                    Code:
                    <DataSource ID="animals" serverType="sql" tableName="animals" testFileName="animals.data.xml" useAnsiJoins="true">
                    	<fields>
                    		<field name="commonName" title="Animal" type="text" />
                    		<field name="scientificName" title="Scientific Name" type="text" primaryKey="true" required="true" />
                    		<field name="lifeSpan" title="Life Span NO TYPE" />
                    		<field name="status" title="Endangered Status" type="text">
                    			<valueMap>
                    				<value>Threatened</value>
                    				<value>Endangered</value>
                    				<value>Not Endangered</value>
                    				<value>Not currently listed</value>
                    				<value>May become threatened</value>
                    				<value>Protected</value>
                    			</valueMap>
                    		</field>
                    		<field name="diet" title="Diet" type="text" />
                    		<field name="information" title="Interesting Facts" type="text" length="1000" />
                    		<field name="picture" title="Picture" type="image" detail="true" imageURLPrefix="/isomorphic/system/reference/inlineExamples/tiles/images/" />
                    	</fields>
                    </DataSource>
                    Normal operation is working. But once you group the ListGrid by the "Endangered Status"-column and try to sort via click on "Life Span NO TYPE", it breaks.

                    Best regards
                    Blama

                    Comment


                      #11
                      Please note that this only happens in FF for me (tested both deployed and Dev Mode, version used FF26). It does not happen in GC42 and IE11.

                      Best regards
                      Blama

                      Comment


                        #12
                        Originally posted by Isomorphic View Post
                        No, this doesn't look like any of the recent 5.0 bug fixes.

                        As far as possibly hitting this in *current* 5.1d builds, a first step is to use the instructions in the FAQ & Debugging topic to get a clear stack trace.
                        Hi Isomorphic,

                        Below is the stack trace that I got using the superdev mode debugger (since I can't use the classic one) running against the 5.1 build form 2015-05-21. Hope this helps. Please let me now if you need more info.

                        com.google.gwt.core.client.JavaScriptException: (TypeError)
                        __gwt$exception: <skipped>: Cannot read property 'sortDirection' of null
                        at isc_ListGrid_getSortArrowImage
                        at isc.A.sorterDefaults.getTitle
                        at isc_StatefulCanvas_getTitleHTML
                        at isc_c_Class_invokeSuper
                        at isc_Button_getTitleHTML
                        at isc_Button_getInnerHTML
                        at isc_Canvas__getInnerHTML
                        at isc_Canvas__insertHTML
                        at isc_Canvas_draw
                        at isc_StatefulCanvas_draw
                        at isc_Layout__drawNonMemberChildren
                        at isc_Layout_drawChildren
                        at isc_Canvas_draw
                        at isc_c_Class_invokeSuper
                        at isc_ListGrid_draw
                        at isc_Layout_layoutChildren
                        at isc_Layout_drawChildren
                        at isc_Canvas_draw
                        at isc_Canvas_addChild
                        at isc_Layout_addMembers
                        at isc_Layout_addMember
                        at $addMemberPostCreate
                        at addMember
                        at onSuccess_52
                        at execute_47
                        at $executeScheduled
                        at runScheduledTasks
                        at $flushPostEventPumpCommands
                        at execute_49
                        at execute_48
                        at apply_0
                        at entry0
                        at anonymous
                        at anonymous
                        at anonymous

                        Comment


                          #13
                          mazzi your stack trace is definitely unrelated to Blama's test case, and from code inspection, looks like it would result from bad usage. If you think it's instead a framework bug, please put together a test case that will reproduce the problem.

                          Comment


                            #14
                            @Blama - we made some changes earlier to address another issue of yours - and we can't reproduce this issue with latest code in either 5.0 or 5.1 with your sample.

                            Can you retest this issue with tomorrow's build?

                            Comment


                              #15
                              Hi Isomorphic,

                              are you saying you also could no reproduce with v10.0p_2015-05-21 or are you saying that it might have been fixed by chance when working on something else and is now not reproducible with v10.0p_2015-06-10?

                              For me, the testcase breaks using v10.0p_2015-05-21 in FF26 only. As written this does NOT happen in GC42/43 and IE11, though.

                              I'll retest with v10.0p_2015-06-11 once it is available.

                              Best regards
                              Blama

                              Comment

                              Working...
                              X