Our blazing fast Grid component built with pure JavaScript


Post by dev team »

Hi,

One specific QA tester has been getting a "Maximum call stack size exceeded" error in Chrome after using the grid for some time (full stack trace below).

uncaught (in promise) RangeError: Maximum call stack size exceeded

at gd.get (schedulerpro.module.js:1799:7)

at gd.changeValue (schedulerpro.module.js:71310:13)

at gd.set (schedulerpro.module.js:1828:36)

at set value [as value] (schedulerpro.module.js:71293:11)

at gd.onLeafItemConfigChange (schedulerpro.module.js:52586:20)

at gd.l [as onConfigChange] (schedulerpro.module.js:4182:159)

at gd.set (schedulerpro.module.js:1844:14)

at set value [as value] (schedulerpro.module.js:71293:11)

at gd.change (schedulerpro.module.js:68601:12)

at gd.trigger (schedulerpro.module.js:5810:25)

get @ schedulerpro.module.js:1799

changeValue @ schedulerpro.module.js:71310

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

triggerFieldChange @ schedulerpro.module.js:46841

changeValue @ schedulerpro.module.js:71445

set @ schedulerpro.module.js:1828

set value @ schedulerpro.module.js:71293

onLeafItemConfigChange @ schedulerpro.module.js:52586

l @ schedulerpro.module.js:4182

set @ schedulerpro.module.js:1844

set value @ schedulerpro.module.js:71293

change @ schedulerpro.module.js:68601

trigger @ schedulerpro.module.js:5810

It seems to be initially very sporadic, but once encountered once then it persists and each attempt to load data into the grid encounters the same error. Interestingly the same QA tester has found that switching profiles in Chrome seems to fix the issue for them.

Based on a seeing a similar issue fixed in Bryntum 5.2.1, both the Grid and SchedulerPro have been updated to to that version though the issue persists.

Marked as a info req because I'm not entirely sure if this is a bug or not, but since this issue occurs within Bryntum, I thought you might be able to advise on it.

We load data into the Bryntum grid as follows:

for (let batchNumber = 0; batchNumber < maxNumberOfBatches; batchNumber++) {
        batchedJobs = await (window as any).Mpro.ApiService.JobService.getJobs(startDate, endDate, batchNumber, false, this.newWebsiteUrl);

    if (batchedJobs && Object.keys(batchedJobs).length !== 0) {
      await this.appendJobs(batchedJobs.filter(job => job.isEventSchema != true));
    }
    else {
      break;
    }
  }

Batching the jobs

@Method() async appendJobs(jobs: Job[]): Promise<void> {
    // Break reference to the array
    if (jobs) {
      this.jobs = this.jobs.concat(JSON.parse(JSON.stringify(jobs)));
      await this.mproGrid.appendData(this.buildGridJobs(jobs as JobModel[]));
    }
  }

Massaging the data

@Method()
  public async appendData<T extends object>(data: T[]): Promise<void> {
    if (!Array.isArray(data)) {
      data = [];
    }

 this.store.add(data);

 if (this.autoSizeOnDataLoad) {
  await this.resizeColumns();
}
  }

Adding data to grid store


Post by marcio »

Hello dev team,

Could you please assemble a sample project with the configuration that you mentioned? Or are you able to reproduce that behavior in one of our demos?

As you mentioned that is a very sporadic issue, we would need a test case to check what's going on there (if that's an issue on our side)

Also, if you could try with the latest version to confirm that the issue still occurs there, that would be nice.

Best regards,
Márcio


Post Reply