-
Notifications
You must be signed in to change notification settings - Fork 290
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
[Bug] Installed style causes Stylus to freeze on Firefox #1590
Comments
I can't replicate the problem. Please use Firefox profiler to capture the log. The log can be uploaded when suggested by the profiler so you can share the link here or you can analyze it yourself. |
Here's a profile https://share.firefox.dev/3LemTfV |
Looks like this userstyle has so-called "catastrophic backtracking regexps" that only activate on some URLs. Unfortunately we can't fix the extension, so you or someone else (the author of the userstyle) will have to find and fix these expressions. See also #416. |
I had a hunch it was regexp related (even before the profile) since that style has so many complex ones. I'll see if I can isolate which one it is and attempt to fix it (and let the author know). The behavior still occurs when the style is disabled, which likely caused false-negatives when I've investigated this in the past (thinking that this style wasn't the cause since it was "disabled" and the problem still occurred). Is that an issue with Stylus where it's still checking regexps when a style is disabled? |
The last section looks particularly suspicious because it uses |
Normally it should happen only when showing the styles in the popup. I'll check if that's so... Edit: turns out it wasn't, so I'll fix it. |
Looks like it's Would it be possible for Stylus to detect these long-running regexps and show a warning or otherwise aid in their detection? It took me quite a while to narrow down the Firefox freezing issues to Stylus, then to that specific style. |
Try replacing |
Adding such instrumentation isn't free so I don't think we can measure each regexp, but I guess we can check the overall matching time and warn somehow, but it's not easy either.
Now you know you can do it quickly by using Firefox Profiler :-) |
That seemed to fix it. I'll pass it along to the style author.
Perhaps it's something Firefox should be warning about (an extension regularly locking for 6+ seconds)
Definitely! This tool seems invaluable for diagnosing issues |
Bug Report
Bug Description
The Google Darkest Fusion style causes Stylus to constantly freeze when it is installed in Firefox. This also causes all network requests in the browser to become stuck while the extension is frozen. It doesn't matter if the style is enabled or not, just having it installed causes the issues. The style manage page locks up, as well as the extension popup on various sites (such as a twitch.tv stream page) when the style is installed. I noticed the issues and isolated the problem to this style in a new browser profile with only Stylus and that style installed. The second the style is installed you can observe the issues.
Screenshots
CSS Code
System Information
Additional Context
I haven't been able to figure out anything consistent between pages where the issue occurs, but it may be pages which have a large number of images (such as a twitch.tv chat). When the extension popup freezes it eventually will display, but in a broken state.
The text was updated successfully, but these errors were encountered: