Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum call stack size exceeded #1235

Closed
rootcause bot opened this issue Jul 24, 2020 · 2 comments
Closed

Maximum call stack size exceeded #1235

rootcause bot opened this issue Jul 24, 2020 · 2 comments
Assignees
Labels
bug Something isn't working high-priority Urgent to have fixed not reproducible Runtime Error
Milestone

Comments

@matsbryntse matsbryntse added the high-priority Urgent to have fixed label Jul 24, 2020
@matsbryntse matsbryntse added this to the Calendar 1.0.1 milestone Jul 24, 2020
@matsbryntse matsbryntse added the bug Something isn't working label Jul 24, 2020
@dongryphon
Copy link

dongryphon commented Jul 24, 2020

I am not able to reproduce this but did read the code implicated in the callstack. Following are my notes.

setConfig loops the config properties, and seems to hit nonWorkingDays which calls updateNonWorkingDays:

    updateNonWorkingDays() {
        this.updateDayNumbers();
    }

Inside updateDayNumbers gathers a few configs right away:

    updateDayNumbers() {
        const
            me                    = this,
            {
                weekStartDay,
                nonWorkingDays,
                hideNonWorkingDays
            }                     = me,

This triggers the initializer for weekDayStart (you see the getter calling the setter in the callstack), which ends up in updateWeekStartDay:

    updateWeekStartDay() {
        this.updateDayNumbers();
        this.calculateWeekBase();

        if (!this.isConfiguring) {
            this.updateDate(this.date, this.date);
        }
    }

While that takes us back to updateDayNumbers this should not go infinitely recursive due to the way the config initializer works. Perhaps if we had more of the callstack we could see where it starts the infinite sequence of calls.

@dongryphon
Copy link

dongryphon commented Jul 25, 2020

The customer indicated that their TZ was UTC+8 but when I changed my TZ to that I was still unable to reproduce the error. Is there a way to get more entries in the callstack? The entries we've captured here are normal so we'd need 3x as many more to see the cycle most likely.

@dongryphon dongryphon self-assigned this Jul 25, 2020
@matsbryntse matsbryntse modified the milestones: Calendar 1.0.1, Calendar 1.0.2 Jul 27, 2020
@isglass isglass modified the milestones: Calendar 1.0.2, Calendar 4.0.0 Aug 17, 2020
@isglass isglass closed this as completed Sep 21, 2020
@SergeyMaltsev SergeyMaltsev modified the milestones: Calendar 4.0.0, 4.0.0 Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority Urgent to have fixed not reproducible Runtime Error
Projects
None yet
Development

No branches or pull requests

4 participants