Announcement

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

    RangeError on SelectItem.setValue(...)

    Hi,

    We're having trouble initializing a SelectItem on a screen. When calling setValue before it is actually displayed, we may end up having this exception:

    Code:
    Caused by: com.google.gwt.core.client.JavaScriptException: (RangeError) 
     stack: RangeError: Maximum call stack size exceeded
        at Object.isc_c_Class__getNextImplementingSuper [as $cs] (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Core.js)
        at Object.isc_c_Class_invokeSuper [as invokeSuper] (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Core.js:246:15)
        at Object.isc_SelectItem__mapKey [as $17b] (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js:1492:320)
        at Object.isc_FormItem_mapValueToDisplay (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js:744:91)
        at Object.isc_c_Class_invokeSuper [as invokeSuper] (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Core.js:247:162)
        at Object.isc_SelectItem_mapValueToDisplay [as mapValueToDisplay] (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js:1491:13)
        at Object.isc_DynamicForm_saveItemValue [as saveItemValue] (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js:256:693)
        at Object.isc_FormItem_saveValue (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js:768:95)
        at Object.isc_c_Class_invokeSuper [as invokeSuper] (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Core.js:247:162)
        at Object.isc_SelectItem_saveValue [as saveValue] (http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js:1486:146): Maximum call stack size exceeded
    	at Unknown.isc_c_Class__getNextImplementingSuper(http@8080)
    	at Unknown.isc_c_Class_invokeSuper(http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Core.js@15)
    	at Unknown.isc_SelectItem__mapKey(http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js@320)
    	at Unknown.isc_FormItem_mapValueToDisplay(http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js@91)
    	at Unknown.isc_c_Class_invokeSuper(http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Core.js@162)
    	at Unknown.isc_SelectItem_mapValueToDisplay(http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js@13)
    	at Unknown.isc_DynamicForm_saveItemValue(http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js@693)
    	at Unknown.isc_FormItem_saveValue(http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js@95)
    	at Unknown.isc_c_Class_invokeSuper(http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Core.js@162)
    	at Unknown.isc_SelectItem_saveValue(http://localhost:8080/HeliosWeb/heliosweb/sc/modules/ISC_Forms.js@146) B57D886E00E67BB2C21BE40291D02A35.cache.html:10034
    It does not always occur. Here is an example where the order of the items order in the form makes the call fail or succeed:

    Code:
        public Canvas buildContent() {
            LinkedHashMap values = new LinkedHashMap();
            values.put("a", "A");
            values.put("b", "B");
    
            SelectItem selectItem = new SelectItem();
            selectItem.setMultiple(false);
            selectItem.setDisplayField("1");
            selectItem.setTitle("Selected item");
            selectItem.setValueMap(values);
    
            TextItem textItem = new TextItem();
            textItem.setTitle("Text item");
    
            VLayout mainLayout = new VLayout();
            mainLayout.setHeight(200);
            mainLayout.setAlign(Alignment.CENTER);
    
            DynamicForm form = new DynamicForm();
    
            // The following fails, but works if we call 
            // form.setFields(selectItem, textItem);
            form.setFields(textItem, selectItem);
            form.setWidth100();
            form.setNumCols(4);
    
            mainLayout.addMember(form);
    
            selectItem.setValue("a");
    
            return mainLayout;
        }
    Could it be an issue with the SelectItem widget ?


    Using:
    Latest Chromium build
    FireFox 21
    SmartClient Version: v8.3p_2013-05-23/PowerEdition Deployment (built 2013-05-23)

    #2
    We'll take a look but can we first confirm - is this an issue in development mode only or are you able to reproduce the problem in compiled mode too (having run "GWT Compile..." and then hitting the HTML launch page with no 'codesvr' parameter)?

    Comment


      #3
      Hi,

      It is occurring in compiled mode, we never use development mode so I can't say if it is the same behavior.

      Best regards,

      Yannick

      Comment


        #4
        We believe we have found the cause of this and have made a change to address it.
        Please try the next nightly build, dated May 28 or above

        Regards
        Isomorphic Software

        Comment


          #5
          We checked against the latest nightly build and now it works fine !

          Thanks !

          Comment

          Working...
          X