Announcement

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

    Cannot set property '$28w' of undefined error

    Hello,

    We ran across the following error while testing our application. It looks like the cacheColumnHTML method is making an assumption that fields[colNum] is not null when there are apparently instances where it can be null.


    12:56:40.857:IBLR1:WARN:Log:TypeError: Cannot set property '$28w' of undefined
    Stack from error.stack:
    GridRenderer._cacheColumnHTML()
    GridRenderer.getTableHTML()
    GridRenderer.getInnerHTML()
    [a]MathFunction.invokeSuper()
    [a]MathFunction.Super()
    GridBody.getInnerHTML()
    Canvas._getInnerHTML()
    Canvas._updateInnerHTML()
    [a]MathFunction.invokeSuper()
    GridRenderer._updateInnerHTML()

    #2
    Thanks for the heads up. Can you let us know which version you are using.
    Also - it would be useful to see a reproducible case for this.

    We could just add a null-guard but without seeing a test case we can't tell if
    a) there's an application level error vs a framework error or
    b) whether there are any other problems implied by this issue

    Regards
    Isomorphic Software

    Comment


      #3
      We are using 8.3 (3/25/13).

      I know that a standalone test case is useful. But, those are very time consuming for us to produce. So, it is difficult to justify spending the time unless this becomes a persistent and severe problem for us. If it does, I will definitely let you know and invest the time in a test case if you elect to ignore this for now.

      But, in general, I believe that we are doing a lot of things with our fields list that most of your users are not. This is because our main grid has nearly 400 defined fields in it and we give the user a view drop-down to rapidly switch between views which results in very rapid hiding and unhiding of fields. And, we've added the ability to dynamically add and remove fields to the grid and datasource fields array for various purposes as well.

      Comment


        #4
        Hi,

        I noticed this post was long while ago, how is status? Is there any solution?

        My company's application has also run into this issue randomly, please see attached picture from Developer console. Sorry I can't provide a repro case as myself has been struggling to find solid repro case. Would you be able to provide any suggestions in any possible causer?

        Thanks a lot!
        Attached Files

        Comment


          #5
          Sorry I don't have any record of us producing a specific patch for this issue. It must have been resolved in some way in a later version of smartclient for our use case.

          Comment


            #6
            This error indicates you've somehow gotten a null into your fields array. This could be bad usage or an actual framework bug. If it's a framework bug, the absence of any other reports probably indicates it's long since fixed.

            You might be able to watch grid.fields in your debugger to see how a null is introduced.

            Please also remember to always post your full version.

            Comment


              #7
              Thanks for your replies. If you compare the screenshot and the piece of codes below, I think the issue was that the number of columns is not the same as the number of grid fields,

              // Java script code below:

              function isc_GridRenderer__cacheColumnHTML(_1, // in my screenshot, _1 = Array[15}, this was an array of 15 elements (its contents was 0, 1, ..., 14), indicating the number of grid columns was 15
              _2, _3, _4) {
              var _5 = this.fields, // in my screenshot, _5 = Array[14], the number of fields was an array of 14 elements, indicating the number of grid fields was 14. The number of grid fields and grid columns mismatching
              _6 = this.$26a;
              for (var i = 0; i < _1.length; i++) {
              var _8 = _1[i], // in the last loop, _8 = 14
              _9 = _5[_8]; // _9 undefined. In my screenshot, the last loop, _5 = Array[14], which doesn't exist, as the length of _5 was 14
              _9.$28w = null; // Exception thrown here

              Comment


                #8
                The version of SmartClient we use is "Version v9.1p_2016-05-26/Pro Deployment"

                Comment


                  #9
                  The relevant piece of code in ISC_Grid is as following:

                  _cacheColumnHTML : function (colNums, autoFit, hPad, writeDiv) {
                  var fields = this.fields,
                  sizes = this._fieldWidths;


                  // compute per-column HTML
                  for (var i = 0; i < colNums.length; i++) {
                  var colNum = colNums[i],
                  field = fields[colNum];

                  field._rowSpans = null; // clear old rowSpan info

                  Comment


                    #10
                    Interesting further analysis, but the first step is to see if you can reproduce this in the latest patched version.

                    Comment

                    Working...
                    X