-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Description
CheckList
- I agree to follow this project's Code of Conduct
- I have read and followed the Contributing Guide
- I have read and followed the Issue Tracker Guide
- I have searched and referenced existing issues and discussions
- I am filing a BUG report.
- I have managed to reproduce the bug after upgrading to the latest version
- I have created an accurate and minimal reproduction
Version
6.7.0
In What environments are you experiencing the problem?
Chrome
Node Version (if applicable)
None
Link To Reproduction
https://codesandbox.io/p/devbox/fabric-vanillajs-sandbox-forked-hnqz4y
Steps To Reproduce
- Open the reproduction
- Click the "Load Good SVG" button, the SVG will be loaded smoothly
- Click the "Load BAD SVG" button, the page will get stuck (you can see the animation stop) and crash after a while
Expected Behavior
The "BAD SVG" can also be loaded successfully.
Actual Behavior
The infinite recursion inside fabric.js cause the web page crashed.
Error Message & Stack Trace
No logs will produces, but the calling stack is:
loadSVGFromString -> parseSVGDocument-> ElementsParser#parse -> ElementsParser#createObject -> ElementsParser#resolveClipPath -> ElementsParser#resolveClipPath -> ElementsParser#resolveClipPath -> ElementsParser#resolveClipPath ...
Then stuck in infinite recursion.