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

REPL builder freezing #7885

Closed
brandonmcconnell opened this issue Sep 20, 2022 · 5 comments
Closed

REPL builder freezing #7885

brandonmcconnell opened this issue Sep 20, 2022 · 5 comments

Comments

@brandonmcconnell
Copy link
Contributor

brandonmcconnell commented Sep 20, 2022

Describe the bug

I've noticed this a few times recently, but this is the first time I've been able to reproduce it reliably. While editing a REPL, it will seemingly randomly freeze, and I won't be able to edit it at all. I'll force-close the tab and re-open it only to find that all my latest changes since the previous save are now gone.

I managed to get a REPL right up to the point of this error and then saved before it crashed.

Reproduction

Visit this REPL, then open the inspector and try to resize the 2 REPL columns (not the inspector). If you can reproduce gthe same issue I'm experiencing, you will be unable to.

REPL: https://svelte.dev/repl/3af2ab67f73d4b198f20eb30cd2907ae?version=3.50.1

Logs

No errors, blank console when opened

System Info

Irrelevant (I think) as this is all on the web, apart from any local setup, so it's not a local dev issue

Severity

annoyance

@Prinzhorn
Copy link
Contributor

It happens as soon as the text gets truncated because you are producing an endless loop with your MutationObserver (which you're also not cleaning up in destroy()). The simplest fix would be attributes: false, but that's up to you how you want to solve it.

@brandonmcconnell
Copy link
Contributor Author

@Prinzhorn It'd be helpful if the REPL could somehow report that in an error and prevent the editor from crashing so I can modify/save my REPL and resolve the bug.

Just thinking out loud here. Thanks for pointing out the error in my program :)

@brandonmcconnell
Copy link
Contributor Author

I'll go ahead and close this issue and open a new one for that. Thanks again!

@brandonmcconnell
Copy link
Contributor Author

Okay, posted the separate issue — sveltejs/sites#382

Thanks again! Closing

@brandonmcconnell
Copy link
Contributor Author

@Prinzhorn Thanks again! I added some logic to my function that checks to ensure that isTruncated has actually changed before updating the title attribute. That did the trick 👌🏼
https://svelte.dev/repl/3af2ab67f73d4b198f20eb30cd2907ae?version=3.52.0

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

No branches or pull requests

2 participants