Results 1 to 3 of 3

Thread: loadRecord binding causing "out of stack space"/"too much recursion"

  1. #1
    Sencha User c54283's Avatar
    Join Date
    Oct 2018
    Location
    Portugal
    Posts
    9

    Default loadRecord binding causing "out of stack space"/"too much recursion"

    Hello, Help, Anyone?

    On an application that is used across several timezones and with different regional settings, some users are reporting an issue I was unable to replicate.
    With extra logging, the origin was detected to be in calling of https://docs.sencha.com/extjs/7.1.0/...hod-loadRecord. Any ideas of what it could be and how to troubleshoot the issue?

    I cannot share code, but the view structure being loaded is the following:
    Code:
    items: [
      {
       xtype: 'form',
       itemId: 'MailContentForm',
       ...,
       items: [
        {
         xtype: 'container',
         ...,
         items: [
          {
           xtype: 'container',
           ...
           items: [
            {
             xtype: 'container',
             layout: 'hbox',
             items: [
              {
               xtype: 'textfield',
               ...
              },
              {
               xtype: 'checkboxfield',
               ...
              }
             ]
            },
            ...
           ]
          },
          {
           xtype: 'container',
           ...
           items: [
            {
             xtype: 'fieldset',
             ...,
             items: [
              {
               xtype: 'textfield',
               ...,
               listeners: {
                change: {
                 ...
                }
               }
              },
              ...
             ]
            }
           ]
          }
         ]
        },
        {
         xtype: 'textfield',
         ...
        },
        {
         xtype: 'textareafield',
         ...
        }
       ]
      }
     ]
    }
    Notice that it works on most users so i kind of having hard time replicating the issue so i can try troubleshooting it.


    Thanks in advance,
    João

  2. #2
    Sencha User c54283's Avatar
    Join Date
    Oct 2018
    Location
    Portugal
    Posts
    9

    Default

    Finally replicate the issue, debugging loadRecord, happens on setValue of object of type "Ext.form.field.Text" of type date on timezone Indiana (-5) but not on timezone UTC (0).

    Finally on to something, seem like it is a fireEvent change recursion. The fireEvent compares the old value and the new, if they are the same it suppress the event.... so the folowing code:

    onTextfieldChange: function(field, newValue, oldValue, eOpts)
    {
    if(newValue !== "")
    {
    field.setValue(Ext.Date.format( new Date(newValue), '${Date.Long.Format}'));
    }
    }

    will causes a recursion of change event that generates a new change event in TextField, only when Ext.Date.format( new Date(newValue), '${Date.Long.Format}') is diferent from newValue.
    "Use The Source Luke"

  3. #3
    Sencha User c54283's Avatar
    Join Date
    Oct 2018
    Location
    Portugal
    Posts
    9

    Default

    ****ing crazy...

    guess what...

    Some obscure thing, the date goes back one day and keeps fireing the event...

    Ext.Date.format(new Date('2013-02-06'), 'Y-m-d') in timezone UTC-5 Indiana results in '2013-02-05'

    Now thats a BUG!
    "Use The Source Luke"

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •