Announcement

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

    Stack overflow / too much recursion error in editor grid in 7.0 RC2

    Hello,

    I have a problem with an editor grid with a combox grid field with a data source.

    In the case when the combo is clicked and after that the button in a tool strip is clicked a stack overflow error will occur. In the case that there is something entered in the combo and then the button is clicked, the stack overflow error will not occur.

    How can I avoid such an error?

    Please try the testcase below I build for this: Note you will get a transport error after clicking in the combo because the test case cannot reach the data source. But the problem occurs also when the testcase can reach the data source.

    Regards Thomas
    Code:
    isc.VLayout.create(
     {
      "ID":"rootDaysLayout_6",
      "autoDraw":true,
      "width":"100%",
      "height":"100%",
      "autoDraw":true,
      "members":
      [ 
       isc.ToolStrip.create(
        {
         "members":
         [ 
          isc.Button.create(
           {
            "ID":"setDefaultCostCentreButton_6",
            "disabled":false,
            "overflow":"visible",
            "tabIndex":0,
            "title":"Click first in the combo below, then click here for too much recursion error",
            "showDisabledIcon":false
           }
           )
         ]
        }
        ),
       isc.ListGrid.create(
        {
         "ID":"daysListGrid_6",
         "width":"100%",
         "height":"100%",
         "selectionType":"single",
         "canEdit":true,
         "editEvent":"click",
         "autoSaveEdits":false,
         "modalEditing":true,
         "fields":
         [
          {
           "editorType":"ComboBoxItem",
           "ID":"daysCostCentreGridField_6",
           "displayField":"daysCostCentreGridField",
           "editorProperties":
           {
            optionDataSource:isc.DataSource.create(
             {
              "fields":
              [
               {
                "primaryKey":true,
                "name":"number"
               },
               {
                "name":"daysCostCentreGridField"
               }
              ],
              "dataFormat":"json",
              "dataURL":"ScComboBoxListGridFieldDataSource?viewNumber=6&id=dayscostCentreGridField",
              "recordXPath":"/resultData"
             }
             ),
            "displayField":"daysCostCentreGridField"
           },
           "name":"daysCostCentreGridField",
           "canSort":false,
           "title":"Costcentre"
          }
         ],
         "data":
         [
          {
           "daysCostCentreGridField":"North (1)",
           "generatedIndex":"1"
          }
         ]
        }
        ),
       isc.LayoutSpacer.create(
        {
         "height":"*"
        }
        )
      ]
     }
     )

    #2
    Remark: clicking in the combo and executing

    daysListGrid_6.endEditing()

    leads also to the stack overflow. Hope that helps to give me a hint how to fix this issue.

    Regards Thomas

    Comment


      #3
      @Isomorphic

      I would appreciate any hint what’s wrong with my list grid field

      Regards Thomas

      Comment


        #4
        What browser(s) is this occurring with? If you've only tried one, please try at least one other.

        Comment


          #5
          The problem occurs with Firefox 3.6.8: "too much recursion" error
          and as well with IE 8: "Stack overflow" error.

          Please execute the above testcase, that I have created for you.

          Regards Thomas

          Comment


            #6
            Not reproducing this in 8.0, which we recommend you upgrade to.

            Note, we get a transport error for the ComboBox.

            Comment


              #7
              With the 8.0 build from 08.08.2010 I got the same result. In 7.0RC2 the stack overflow is a line 536, in beta 8 it is at line 545.

              Please do the steps:

              1. Click in the combo "North"
              2. Click in the above button.

              Best is, to reproduce the issue with IE 8. Because Firefox freezes for 10-20 seconds. IE shows the error immediately.
              Attached Files

              Comment


                #8
                We already tried this and didn't see the problem.

                Try changing the dataURL to an intentionally bad value so that you also get a transport error. If that causes the problem to go away, see if you can reproduce the issue with the dataURL pointing to a static file, then we'll be able to do as well with the same static file.

                Comment


                  #9
                  Hmm, strange that you can not reproduce it.

                  As you asked, I exchanged the dataUrl to " thisFileDoesNotExist.txt" and got as expected the transport error.

                  After clicking OK on the transport error, and clicking on the button above the grid I´m getting the stack overflow error…

                  But the stack overflow comes only on the first click on the button above the grid. The subsequent clicks do no harm. Then my testcase must be refreshed in the browser to reproduce the issue.

                  Comment


                    #10
                    Ah, getting it now, our click sequence was slightly different. We'll take a look.

                    Comment


                      #11
                      Aaaaah :-)

                      Comment


                        #12
                        Hi Thomas,
                        It turns out this is caused by the field having the displayField property set to the same value as the field name.
                        There may be something else going on as well and we'll get to the bottom of it / look at how best to fix the framework so it either handles this case or warns (without crashing) -- but the simplest fix for your code is to just remove these displayField settings:

                        Code:
                          [
                              {
                               "editorType":"ComboBoxItem",
                               "ID":"daysCostCentreGridField_6",
                               "editorProperties":
                               {
                                optionDataSource:isc.DataSource.create(
                                 {
                                  "fields":
                                  [
                                   {
                                    "primaryKey":true,
                                    "name":"number"
                                   },
                                   {
                                    "name":"daysCostCentreGridField"
                                   }
                                  ],
                                  "dataFormat":"json",
                                  "dataURL":"ScComboBoxListGridFieldDataSource?viewNumber=6&id=dayscostCentreGridField",
                                  "recordXPath":"/resultData"
                                 }
                                 )
                               },
                               "name":"daysCostCentreGridField",
                               "canSort":false,
                               "title":"Costcentre"
                              }
                             ],
                        == Update: We've added a check for this case to the source so this will not be a problem in future builds. Though the change suggested above is still appropriate.
                        Last edited by Isomorphic; 17 Aug 2010, 15:18.

                        Comment


                          #13
                          Hi Isomorphic,

                          yes, thank you. Changing the name of the displayField to another as the widget name has fixed the issue for me.

                          Regards Thomas

                          Comment


                            #14
                            We are a professional,Buy WOW Gold loyal and reliable RuneScape Gold store online. We supply RuneScape Gold to our loyal customers that you may buy Cheap RS Gold. We provide the cheapest wow gold all the servers and the first class service to our loyal and reliable customers.

                            Comment

                            Working...
                            X