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

Infinite loop causes tab to crash #27

Closed
eric-simonton-sama opened this issue Nov 22, 2017 · 4 comments
Closed

Infinite loop causes tab to crash #27

eric-simonton-sama opened this issue Nov 22, 2017 · 4 comments

Comments

@eric-simonton-sama
Copy link

I originally filed this issue with ngx-bootstrap because I discovered it when triggered by their tooltips. (Actually, our users discovered it in production 😞 ) However, after much investigation, I found it was the combination of their tooltips, this library, and browser zooming that all have to come together to trigger the issue.

Here is a plnkr demonstrating the issue. Zoom the browser in or out and mouse over the buttons to lock up the browser tab as it spikes the CPU in some kind of infinite loop. You may need to experiment: for me on Chrome it locks up at 90% and 125% zoom, but not at 100% or 110%.

Here is same the issue I filed with ngx-bootstrap. I'm not sure which library is to blame, so I'm also filing this issue as well in case there is something to fix here.

@que-etc
Copy link
Owner

que-etc commented Nov 22, 2017

@eric-simonton-sama

I've managed to trace it down to MutationObserver and zone.js. Here is an updated code which doesn't use ResizeObserver at all.

Though I still don't know what exactly causes this loop.

@que-etc
Copy link
Owner

que-etc commented Nov 22, 2017

Updating to v0.8.18 didn't help. For the time being, looks like it's a problem with zone.js

@que-etc
Copy link
Owner

que-etc commented Nov 22, 2017

Yeap, problem is definitely on the zone's side.

In this example I commented out that patchClass('MutationObserver') line which disabled modifications to MutationObserver (a non-modified class is being used).

Everything seems to work smoothly now.

@eric-simonton-sama
Copy link
Author

Thank you for this investigation! I'll close this issue and open one with zone.js instead.

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

No branches or pull requests

2 participants