-
Notifications
You must be signed in to change notification settings - Fork 329
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
Markdown parser freezes on particular .wide,.toc combo #2686
Comments
I have been able to reproduce the issue on the live site using the following text:
From my testing, it looks like the website freezes up for about 42 seconds, give or take. From this code, I created the following test case:
This test completes in ~20ms. Modifying it to include text in the H1 list element did not change the test duration. From these results, I can only conclude that the issue is NOT in Markdown, but rather some other issue causing the freeze. I will note here that after the ~42s delay, the H1 element does not appear on the page. Locating it using the Inspection tool shows that it is well off the end of the page; my best guess at the moment is that it is wider than the |
Testing this step by step through the code, I also see that it generated the Markdown correctly, but then has an issue when placing the column break div at the end of the page (each page gets a column break added artificially to make the columns work properly.) Not sure exactly why that breaks this particular case though. |
Working on the theory that the
So far, my testing shows that the ~42s delay is completely removed. If this correct, we might be able to resolve the issue by making the |
I've put together an example brew (https://homebrewery.naturalcrit.com/share/mwEFvx4n4Yct), in which:
This brew does not exhibit the ~42 second delay when the H1 header in the Table of Contents is changed. CSS:
|
Opera GX user mentions that having this issue in their new brew blocks the ability to save and create new brews, this would move this issue to a P0, anyone able to confirm? |
This might hide the issue, we still need to troubleshoot why this situation causes a crash to occur in the first place, because CSS on its own shouldn't cause crashes. There is a deeper bug in our brew preview generation that it can't handle certain inputs. At worst, we should have garbage in/garbage out. Not garbage in/crash. |
I was poking at this issue again last night - I removed the artificial column break completely by commenting out But when entering the reproduction text, the delay still occurs. I think that this means that we can eliminate the column split as the cause of the delay. |
Attempting to investigate this again in the last few days, I've found that the delay is now absent when following the reproduction steps. Can anyone else confirm? Running Chrome Version 117.0.5938.132 (Official Build) (64-bit) for Win 10 x64. |
Yup, looks like this was a Chrome issue. Testing on Chrome 110 from last Feb has the issue, but on the latest version it works fine. |
Renderer
v3
Browser
Chrome
Operating System
Windows
What happened?
A couple users have reported the browser freezing when editing a table of contents in V3. Minimal example here:
Attempting to add a
#
after the second bullet point will cause the browser to freeze. This only seems to occur if both.wide
and.toc
classes are set. Similarly:Completing the
toc
above will cause this to crash.The text was updated successfully, but these errors were encountered: