-
Notifications
You must be signed in to change notification settings - Fork 396
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
Firefox - Most gauges layout breaking after a few seconds #251
Comments
Hi, I have has a similar issue for more than a year with Firefox and this gauge type. Issue takes 50 updates to display the missalignment, i.e. >100 seconds with the test code below: Test code html, perhaps someone has a tip on what's causing the issue? P.S. Thanks to the author, great gauges and to you for taking time to read and perhaps assist. |
Same here on Raspberry PI4 4GB and Win11 both running Firefox. |
Confirming the problem with Firefox 96.0.3 (64-bit) on Windows 10. Animations (as they usually are because they are one of the coolest thing in these) must be on for this problem to occur. As said above, most of the animated demo gauges on the official example pages fail in a few seconds. My workaround is to use the update method to set valueText everytime after updating the value [to a string containing the numeric value just set; so visually value box will look the same]. It looks like this workaround works for some reason, no problems so far. However, with that approach animatedValue will not be available (valueText will override it). |
Same problem here.... |
Hi panuworld, I'm having the same problem with Firefox but I can't seem to get your workaround to work. I'm just doing this each time I have a new value:
I guess I am missing something in your workaround description! Can you see what I am doing wrong? It would be nice to get this fixed if possible! |
My code uses the update method to update the valueText and it (looks like it) helps with this problem. Wondering if the valueText can be set directly as a property at all... My code:
My PWA using this workaround is here: https://panuworld.net/liikenne/nopeus/speedo.htm (however, it is not really useful on desktop Firefox without GPS) Edit: Disclaimer: this seems to work around the acute problem for now. However, I have no idea what is the root cause. So the reliability of this workaround cannot be guaranteed. |
Hi, I have commented in the differences as this file works standalone as an example. Thanks for the hint. |
Many thanks panuworld and OneOfTheInfiniteMonkeys. I didn't know about the gauge.update facility but now I've implemented it in my code it works perfectly. I don't do much of this sort of coding, being more of an application programmer, so your examples were really helpful! |
be very careful with using this workaround as updating too often with this approach will kill the browser. |
That's an interesting comment, fencer. I've not "killed" any of my browsers with updates every second or so but perhaps you're thinking about much higher update rates? What resource is the browser running out of to cause it to crash? |
您的邮件我已收到,谢谢!
|
I have about 4 gauges 2 of which update 2-4 times a second. One of them was using the update method, Firefox would eat up 3GB+ RAM in very few seconds till eventually get unresponsive. |
Interesting, thank you. I found that my Firefox which had been running for 8 hours or so was using 1.7GB with 15+ open tabs, two of which are displaying gauges that use the update function. I closed Firefox, reopened it and refreshed the tabs one-by-one. That got me to about 1.2GB but there was no big uptick in memory use when I refreshed my gauge pages. I've watched for 30 minutes or so with very little change in memory use. Of course, if I start refreshing tabs displaying dynamic pages then memory use goes up as more stuff gets cached but I can't see that the gauges are gobbling up RAM, nor am I experiencing any unresponsiveness. |
I have tried to make an example to reproduce the issue but I had no success, so I went ahead and restored the guage.update in my code and still did not happen. I suspect it could be a combination of other things. Will post an update in case I figure it out. |
Same here, when viewed by Firefox on Win10. On Firefox v101.0, using gauge.min.js served from cdn.rawgit.com, I did see a deprecated warning message on FF debug console from on some gauge draw method. After updating to FF the current latest version (v102.0.1), no warning messages occurred but stated problem persists. |
您的邮件我已收到,谢谢!
|
as described here Mikhus/canvas-gauges#251 the proposed change should woraround the problem with firefox. it dosent seems that the autor of the lib would fix this. additional description and test of the workaround here https://forum.iobroker.net/topic/57487/vis-anzeige-gevierteilt/29?_=1661722561928
hi Mikhus, even on the live demo page, I can get broken gauges after a few seconds:
https://canvas-gauges.com/documentation/examples/
just hover with the mouse on any gauges in the "Zero Configuration Gauges" or "Other Custom Radial Gauges" or "Other Custom Linear Gauges" sections, stay there for about 10 - 20 seconds and after a while the layout will get corrupted
canvas-gauges version: 2.1.7
Tested on Firefox 95.0.1 (64 bit) on Ubuntu 20.04.3 LTS
cannot reproduce on google chrome, no other browser available here for me
The text was updated successfully, but these errors were encountered: