drawExcludeDays() in gannt chart renderer can loop infinitely #4353
Labels
Area: Development
Contributor needed
Good first issue!
Graph: Gantt
Status: Approved
Is ready to be worked on
Status: Awaiting PR
Type: Bug / Error
Something isn't working or is incorrect
Description
Creating certain kinds of gannt charts will cause the Mermaid renderer to hang. Looking at the debugger, it appears to be stuck infinitely iterating over this loop:
mermaid/packages/mermaid/src/diagrams/gantt/ganttRenderer.js
Lines 497 to 514 in 32d553a
Steps to reproduce
Try rendering the attached Mermaid code in the live editor, it will hang.
(Note that while you can paste this into the Mermaid live editor, you'll probably want to reset its site data after experiencing the hang, as the live editor appears to always load its previous input on page load.)
Code Sample
Setup
Mermaid version: 10.1.0
Browser and Version: Tested on Chrome 112.0.5615.137 and Safari 16.3.
Note that this bug does not occur on Firefox 112, which throws a
Invalid date:202304
error. Perhaps this suggests that Chrome and Safari may be parsing dates in a way that leads to some kind of infinite loop?Additional Context
No response
The text was updated successfully, but these errors were encountered: