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

Too much recursion error when using dayMaxEventRows with timeZone set and default event ordering #7462

Closed
1 task done
boris-petrov opened this issue Sep 25, 2023 · 9 comments

Comments

@boris-petrov
Copy link

boris-petrov commented Sep 25, 2023

Reduced Test Case

https://codepen.io/kamenf/pen/mdaxmOW

Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?

  • I understand

Which connector are you using (React/Angular/etc)?

No connector (vanilla JS)

Bug Description

Open the test case. You'll see in the console "Uncaught RangeError: Maximum call stack size exceeded". It seems to happen in Chrome but not in Firefox.

Let me know if you need more information.

P.S. Actually it does happen on FF. The error is Uncaught InternalError: too much recursion. Also, note that it doesn't seem to happen when UTC is used. We reproduce it with a local time of GMT+3.

@acerix acerix changed the title Stack overflow exception Too much recursion error when dragging events Oct 4, 2023
@acerix
Copy link
Member

acerix commented Oct 4, 2023

I don't see the error initially, but I do see it after dragging some events around randomly. It seems that setting eventOrderStrict: true may fix it as a workaround. It would help if you can minimize the test case so it only includes event data required to trigger the error and if it can trigger on load instead of having to drag events randomly.

@boris-petrov
Copy link
Author

boris-petrov commented Oct 8, 2023

@acerix - note that the fake data I've put is for September - so you have to go to that month to see the exception. Please try and let me know if it still doesn't happen for you. For me and my colleagues it does.

As for minimizing the test case... believe me, we tried. But we really have no idea which part of the data causes it. At least it happens consistently every time so it should be easier for you to debug.

P.S. We just know it happens with a lot of data and when dayMaxEventRows is exactly 6. 5 or 7 in this case work fine.

P.S.2 We also notice that with this specific data the 26th of September and onwards are shown incorrectly - the "+XX" amount of events is not shown.

P.S.3 Also, note that we've tested that the exception happens when using a UTC+3 timezone. UTC+1 for example doesn't seem to break it.

@kamenf
Copy link

kamenf commented Oct 8, 2023

Here is the test case with reduced entries and set to show the problematic month in problematic time zone, so you can directly observe the error in the console without need to drag or do anything else: https://codepen.io/kamenf/pen/QWzzaOm

@acerix
Copy link
Member

acerix commented Oct 13, 2023

Thanks for the details and for the new test case, I can now easily reproduce the error. I simplified the event data a bit and the error still occurs in this test case:

https://codepen.io/acerix/pen/yLGrZzq?editors=0010

The bug seems to come from dayMaxEventRows causing looping when trying to order the events.

As a workaround, it seems to work to use dayMaxEvents instead, or also to order the events another way like eventOrder: 'title'. You could also add a property to events which specifies the order they should appear (e.g. based on start time) which I believe would also avoid this bug.

@acerix acerix changed the title Too much recursion error when dragging events Too much recursion error when using dayMaxEventRows with timeZone set and default event ordering Oct 13, 2023
@espen
Copy link
Contributor

espen commented Oct 19, 2023

I am facing the same issue. dayMaxEvents did not result in any change for me but setting eventOrder: 'title'did.

@gjvoosten
Copy link

I don't specify timeZone or dayMaxEventRows, only dayMaxEvents, so the title of the issue seems not to cover it. Since using eventOrder: 'title' is not a real solution for me, I am currently sorting the list of events myself and using eventOrder: [].

Is anyone working on a real fix for this issue?

@taylorTianzige
Copy link

i have the same issue, please help~~~~

@JuKeZo
Copy link

JuKeZo commented Jan 26, 2024

I experience the same issue using fullcalendar with angular. I tested versions 6.1.9 and 6.1.10 where the error occurred. I also checked it with 6.1.8 and the error doesn't appear. Nonetheless, in 6.1.8 it seems that the values for dayMaxEvents and dayMaxEventRows are not respected in timeGrid's allDay section. So, for me it's not really an option to use 6.1.8. It seems the error was introduced in 6.1.9.

I also tested various combinations of values for dayMaxEvents, dayMaxEventRows or eventOrder but the error keeps popping up. Depending on these settings, another combination of events is necessary to trigger the error. I don't use any setting for timeZone.

@arshaw
Copy link
Member

arshaw commented Feb 20, 2024

Fixed in v6.1.11

Updated repro:
https://codepen.io/arshaw/pen/VwRNxxx?editors=0010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants