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

Worker makes Chrome crash when creating/deleting many editors #1652

Closed
dgaviola opened this issue Oct 14, 2013 · 4 comments · Fixed by #2087
Closed

Worker makes Chrome crash when creating/deleting many editors #1652

dgaviola opened this issue Oct 14, 2013 · 4 comments · Fixed by #2087

Comments

@dgaviola
Copy link

We have a single page application and we have to show several snippets of Javascript code in different editors. We create them when a popup is opened and we destroyed them when the popup is closed.

This works great when we don't use workers. When we enabled them, after opening and closing the popup a few times, Chrome crashes.

I created a snippet of code that demonstrate the issue:

http://embed.plnkr.co/BdAo3m0b5yfI2LvT5uX6/

If you click in the 'Recreate' button several times (around 15 times), Chrome will crash (I tested in different computers under Linux).

Obviously you need to run that example somewhere where you can run the worker as it doesn't work on Plunker due to the cross origin issue.

Maybe this is related to #331 but not sure.

@nightwing
Copy link
Member

Destroying editor doesn't destroy the session, and chrome crashes after ~70 workers are created.
As a workaround you can call editor.session.$stopWorker() before editor destroy,
And i'll add session.destroy in the next version. It can cause problems if one destroys the editor before setting session to another editor, but current version causes more problems.
Also in long run we need to use one worker shared by all editors instead of one per session.

@nightwing
Copy link
Member

Btw your example works fine in chromium nightly! Huray for getting rid of stupid cross origin restrictions!

@dgaviola
Copy link
Author

Thanks nightwing! I will use that workaround.

@carlos-aguayo
Copy link

This would be great to have fixed.

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

Successfully merging a pull request may close this issue.

3 participants