jQuery UI Widgets Forums Scheduler ERROR RangeError: Maximum call stack size exceeded

This topic contains 11 replies, has 4 voices, and was last updated by  admin 4 years, 6 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author

  • orouwk
    Participant

    Hi
    I’m testing the scheduler in angular app and i get an error in console at some point but it’s not critical since the app is still running.
    I started testing with ver.4.5 getting this error

    
    Uncaught RangeError: Maximum call stack size exceeded
        at Function.style (http://app.lan54/assets/js/jquery.min.js:5:3094)
        at http://app.lan54/assets/js/jquery.min.js:5:28247
        at Function.access (http://app.lan54/assets/js/jquery.min.js:3:6682)
        at init.b.fn.(anonymous function) [as width] (http://app.lan54/assets/js/jquery.min.js:5:28005)
        at a.(anonymous function)._arrange (http://app.lan54/assets/js/jqwidgets/jqxscheduler.js:7:5521)
        at a.(anonymous function)._updatecolumnwidths (http://app.lan54/assets/js/jqwidgets/jqxscheduler.js:14:3048)
        at a.(anonymous function)._updateScrollbars (http://app.lan54/assets/js/jqwidgets/jqxscheduler.js:7:2190)
        at a.(anonymous function)._renderrows (http://app.lan54/assets/js/jqwidgets/jqxscheduler.js:12:10199)
        at a.(anonymous function)._updatecolumnwidths (http://app.lan54/assets/js/jqwidgets/jqxscheduler.js:14:3032)
        at a.(anonymous function)._updateScrollbars (http://app.lan54/assets/js/jqwidgets/jqxscheduler.js:7:2190)
    
    

    after updating to ver5.4, i get almost the same, that is this one

    
    main.js:1442 ERROR RangeError: Maximum call stack size exceeded
        at String.replace (<anonymous>)
        at Un.trim (http://localhost:8100/build/polyfills.js:1:22865)
        at Mr (http://localhost:8100/build/polyfills.js:1:26521)
        at f.jqx.date.r.timeToMS (http://localhost:8100/assets/js/jqwidgets/jqxdate.js:7:20924)
        at new f.jqx.date (http://localhost:8100/assets/js/jqwidgets/jqxdate.js:7:40724)
        at f.jqx.date.r.clearTime (http://localhost:8100/assets/js/jqwidgets/jqxdate.js:7:34602)
        at b.(anonymous function).getVisibleDate (http://localhost:8100/assets/js/jqwidgets/jqxscheduler.js:7:24841)
        at b.(anonymous function).getViewStart (http://localhost:8100/assets/js/jqwidgets/jqxscheduler.js:7:23923)
        at b.(anonymous function)._renderDayWeekAppointments (http://localhost:8100/assets/js/jqwidgets/jqxscheduler.js:7:220239)
        at b.(anonymous function)._renderAppointments (http://localhost:8100/assets/js/jqwidgets/jqxscheduler.js:7:237047)
    

    tks


    Hristo
    Participant

    Hello orouwk,

    Could you clarify it?
    Please, provide us a simple example that demonstrates this issue.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    orouwk
    Participant

    i’ve created a plunkr to avoid putting too much code in the forum.
    it’s not a working example since it’s angular and it takes a lot to do this, but if required, i’ll give it a try.

    https://plnkr.co/edit/YcaPDI1pDh2uheEzVqTJ?p=catalogue

    there is also a little calendar used to change the current day on the scheduler on that page.


    Hristo
    Participant

    Hello orouwk,

    Thank you for this feedback.
    We will investigate this case.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    orouwk
    Participant

    Is there any progress with this error?
    I keep getting errors during tests.

    See below

    jqx scheduler error

    https://imagebin.ca/v/3iIt836WVXQo


    Hristo
    Participant

    Hello orouwk,

    I check your code and it seems the issue become from one of these three things: SchedulerProvider, ISchedulerAppointmentDataFields, SchedulerAppointment.
    Could you provide us the source code for them? Then we could try to check this.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    orouwk
    Participant

    sure

    i’ve forked that plunk and added the requested files.

    https://plnkr.co/edit/GT5xL66NlHvp9sWQE8tr?p=info

    At some point, I got a similar error when the mouse was hovering over an appointment, but maybe this was because of some inconsistencies when updating/deleting events from the scheduler.

    I get this one instead even if the component is not in use, I mean I positioned it in a slider-page and sometimes the error came even when the current slider page is not the one with the scheduler.

    tks


    Hristo
    Participant

    Hello orouwk,

    I would like to ask you for more information where exactly you get this error. I saw in your example there is has a lot of “console.log” and you could find the place by them.

    Also, it will be better if you can provide me a simplified example, the interface to be with fewer properties and to include these methods that cause the issue.

    I tested this example and it seems to work fine.
    It is based on this tutorial: https://www.npmjs.com/package/create-jqwidgets-angular-app
    I think somewhere in your customizations cause that issue.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    orouwk
    Participant

    I’ve sent you a performance dump by wetransfer. It was taken with chrome and had almost 100mb so email was not an option.
    I can’t possible figure out the mistake in implementation of this component.
    I followed your tutorial but I guess there is more than that to consider.
    Please have a look over that dump, maybe you can figure out the issue.
    All that I can notice is ‘style recalculation’ for jqxscheduler is killing the app.

    screenshot of the performance tool test
    screenshot

    thanks a lot


    Hristo
    Participant

    Hello orouwk,

    I reviewed the picture that you provide me and after that, I try one of our demos and I cannot say that the root of the issue is here.
    I would like to suggest you try to edit your project and create it on small modules and it will be more easy to investigate each one separately.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    jefryarch
    Participant

    This error is almost always means you have a problem with recursion in JavaScript code, as there isn’t any other way in JavaScript to consume lots of stack. Sometimes calling a recursive function over and over again, causes the browser to send you Maximum call stack size exceeded error message as the memory that can be allocated for your use is not unlimited. It’s possible to cause infinite recursion in a fully promisified code, too. That can happen if the promises in a chain don’t actually perform any asynchronous execution , in which case control never really returns to the event loop, even though the code otherwise appears to be asynchronous. That’s when it’s useful to wrap your recursive function call into a –

    setTimeout
    setImmediate or
    process.nextTick

    Also, you can localize the issue by setting a breakpoint on RangeError type of exception , and then adjust the code appropriately. Moreover, you can managed to find the point that was causing the error by check the error details in the Chrome dev toolbar console , this will give you the functions in the call stack, and guide you towards the recursion that’s causing the error.


    admin
    Keymaster

    We cannot reproduce such issue with the current version of the software.

    Regards,
    Peter

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.