Mousemove event problems using Firefox (on some systems)
On Firefox (v14 to v18, at least) under Debian 6.0.6 and Ubuntu 12.4, Kinetic (and sometimes ordinary canvas-based) mousemove event processing is broken: mousemove processing does not occur until the mouse stops moving. Chrome works properly on these systems. Firefox on many, but not all, other systems also works fine (see below).
The problem can be seen here:
http://hea-www.harvard.edu/saord/test/mev2.html
which is based on the Kinetic tutorial:
http://www.html5canvastutorials.com/kineticjs/html5-canvas-path-mouseover/
This simple test page consists of a grey logging area and two mouse interaction areas: the green area is a Kinetic layer containing a Kinetic triangle, while the blue area is a simple HTML5 canvas element. Moving the mouse around either of these areas should fire a mousemove callback to display the mouse position in the upper left of that area and also in the grey logging area (using a textarea element).
On Debian 6.0.6, mouse updates in the green Kinetic area (as well as logging in the grey area) only happen when the mouse stops moving. Mouse updates in the blue canvas area (and grey logging area) happen continually as the mouse moves, as expected.
The same behavior is seen for Ubuntu 12.04, although sometimes updates in the green Kinetic area do happen sporadically as the mouse moves, e.g., sometimes when making tiny circular mouse movements.
So under Debian and Ubuntu, mousemove callbacks are not executed properly by Kinetic, but are handled properly on a plain canvas. Note that the grey logging area also is not updated as the mouse moves in the Kinetic area, as if the mousemove callback is not being fired at all.
However, that this probably is not a Kinetic bug can be seen on a Mac running Firefox 17 or 18 by unclicking the Firefox Preference:
Advanced -> General -> Use hardware acceleration when available
and restarting Firefox. In this case, neither the green Kinetic area nor the blue canvas area are updated until the mouse stops. Oddly, in both cases, the grey text area is updated smoothly as the mouse moves. This partial event processing seems to indicate that canvas updates are not being performed, but other parts of mousemove processing are being performed.
Our current hypothesis is that Firefox is determining how to process mousemove events based on an evaluation of the host environment. Sometimes canvas updates are delayed, while other times mousemove events are ignored entirely. Sometimes it even seems that processing changes (but always for the worse!) as the mouse moves. It also seems to be true that our image display application is able to manipulate canvas-based images properly on Debian/Ubuntu machines if we turn off Kinetic processing. But the Mac tests (and other hints) lead us to conclude that Kinetic is simply the fall guy for a Firefox issue.
In any event, I don't see any Kinetic reports with these symptoms, and I only see a few Firefox bug reports that might be related:
Bug 612695 - Drawing is halted during heavy call loads from mousemove. https://bugzilla.mozilla.org/show_bug.cgi?id=612695 Demo: https://bug612695.bugzilla.mozilla.org/attachment.cgi?id=490984
Bug 732621 - Rendering/processing in onmousemove is very laggy in fractal demo https://bugzilla.mozilla.org/show_bug.cgi?id=732621 Demo: http://www.fragsworth.com/fractals/
Can you please verify that Kinetic is not preventing or ignoring mousemove event processing? And if so, do you feel this problem is important enough to warrant your participation (or even lead) in a Firefox bug report?
Do you have any other advice? The world of astronomical data analysis is heavily tilted toward Linux and other flavors of Unix, and the threat of our Kinetic-enabled software not working for an unknown number of users is a serious problem.
Hi there,
I'm not a Kinetic user, and stumbled on this issue report when searching for a solution to a very similar bug I'm seeing with emscripten-qt. In short: I think https://bugzilla.mozilla.org/show_bug.cgi?id=612695 is probably the culprit here - at the very least, it is not Kinetic-specific. See also https://bugzilla.mozilla.org/show_bug.cgi?id=602303.
Best wishes, Simon
We have to be a bit careful here: most seemingly related FF reports are about the canvas not being updated. Here, we have offered an example where a textarea element is also not being updated. In addition, Kinetic calls can produce incorrect behavior in scenarios where pure canvas calls do not.
So, while this does appear to be a FF issue, verification is needed that Kinetic is not exacerbating a FF problem. Beyond that, the Kinetic-based examples might be more easily reproducible by FF experts than previously reported problems, implying that Kinetic experts might be able to help shed light on the problem.
Eric
Thanks for sharing your experience. It helped me a lot!
I use JKinetic kinetic-v3.8.3.js in some little Game. Yes, I use Canvas. There are several Users which cannot play as like interact in this Game within Firefox Version 18.
Example-Site: http://downfight.de/attmap/?level=17 There should be Tooltips and Menus on several Objects. That is the Problem.
It seems that Firefox 18 with functional Hardwareacceleration allways works well. Firefox 17 works well. Crome works well. Internetexplorer 10 works well.
It seems like Firefox 18 with deactivated or non supported Hardwareacceleration does not work well. There are no onmousemoves, etc. http://img833.imageshack.us/img833/7637/7020b402a6bf47189ee5347.png On some Systems even with Hardware-Acceleration-Checkbox checked it seems Hardware-Acceleration is not turned on, because of something. (Graphicsdriver, ...) I found your Article and compared the Hardware-Acceleration-Configs:
Source: chrome://gpu/ Source: about:support
System 1 in which it always works: Crome: http://img208.imageshack.us/img208/4681/6cd5b7b613564f7aa33dd52.png Firefox 18: http://img843.imageshack.us/img843/6840/4d27ccc77adb4df8a463b13.png
System 2 in which it doesnt work on Firefox 18: Crome: http://i.imgur.com/Riw93.png Firefox 18: http://i.imgur.com/zT0xn.png Error! Firefox 17: http://img40.imageshack.us/img40/6355/3e34666e47cc4c818189f91.png Works!
I hope that I helped back. I would be glad if anyone knows what to do here ;)
Greetings Nibbels
I talked some Users into a Graphicsdriver Update.
It worked. Firefox 18 is now accepting Hardware-Acceleration again like in Version 17 and the Problems are gone. http://img204.imageshack.us/img204/2712/a28c24b715604292b7e5b27.png : tells the user to upgrade to higher version. http://i.imgur.com/gQyzO.png : Same here.
Its good information to know that upgrading graphics drivers can fix the problem on some machines. But without knowing the decisions being made by FF regarding mousemove events (if indeed decisions are being made!) and whether Kinetic might be doing anything to exacerbate the FF problem, the question of whether a given machine works with Kinetic can only have a random answer: a) today we tested a Linux Mint 13 machine which worked using FF 17, but failed spectacularly as soon as we upgraded to FF 18. b) we re-tested a CenOs machine that failed in the past but worked under a very light load. c) we tested a pretty powerful Ubuntu machine that worked fine, where previously it seemed that Ubuntu mostly failed.
The Linux Mint case (FF17 works, FF18 broken) is distressing because the graphics is handled by the integrated intel chip, so (to our knowledge) no driver update is available -- hence no driver upgrade fix. That's going in the wrong direction ....
Eric
Thanks again for your answer.
I cannot tell much about Linux-Machines or different Loads. I only tested one single defined software/amount of objects with many PCs.
Till now I got over 7 replays from users. They all installed some new graphics-driver and now it works. 2 went back to Firefox 17, because they didnt want to or they didnt know how to install drivers. If seven give an answer, the number of people following should be much higher... After I told them what to do, not anybody complained about the situation anymore.
Seems like Firefox 18 got a little picky about graphics.
When I startet with JKinetic, I put in around 5000 Objects. All with mouseover. Little circles. I did that to test how far I can go. Three close people told my that their Computers really crashed with a frozen and scrambled picture. One PC-crash I saw with my own eyes and I could not believe that my website was able to do such a thing. In my world that was not possible :) They had to press the resetbutton to hardreset their systems.
Maybe Firefox figured out some faulty board/driver combinations and disabled them for use. And maybe they did that in some rush. I would love some workaround to force Firefox using Hardware-Acceleration just as it is. Therewith we could test stability by our owns.
I think its weird that people now have to care about graphicboards and driverstuff to visit Websites :dart:
Edit: I found something :+1: On the bottom of the Website there are ways to force Firefox using blocked drivers. I suppose so. See also: https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drivers
Edit: Finally in my eyes the last question still is why I really need Hardware-Accelleration. Why Canvas doesnt work without it? That could really be some Firefox-Bug.
Good news. We have fixed this problem on all previously broken Debian/Ubuntu machines (one CentOS outlier left to test) by setting “gfx.xrender.enabled” to “false” in Firefox's about:config, as described here:
http://www.hackermusings.com/2012/05/firefoxs-graphics-performance-on-x11/
It’s been long known that a vocal minority (or perhaps even
majority) of Firefox users have had issues with rendering
performance on X11, but nobody has quite pinpointed what the
issue is.
Recently Nicolas Silva landed a change in mozilla-central to
add a preference to allow for disabling the use of the RENDER
extension when drawing using Cairo on X11. I’d like to call on
any Firefox/Linux users who have been experiencing speed
issues to download the latest nightly and go to about:config
and set “gfx.xrender.enabled” to “false”. If you could also
let me know what hardware and drivers you’re running that’d
also be great.
In addition, Mac Firefox 18 appears to fix the related problem that occurs when hw acceleration is turned off in the Mac Firefox Preferences (see original report above).
This fix seems to span our full problem space, is simple to document, and is less invasive than upgrading hardware and/or drivers. Thus, we are closing our internal investigation, at least for the time being.
Eric
Can anyone confirm whether or not this is the same bug as https://bugzilla.mozilla.org/show_bug.cgi?id=835064 ?
Good morning!
I read the article word by word: Whats new for me is that "gfx.canvas.azure.enabled" may fix it. In fact, i have seen one Laptop with a Nvidia 9300M GS, that wouldnt even work after newest driver install. So far.. it seemed so within my short time analysis. I would love to test your "gfx.canvas.azure.enabled"-fix on it to see if we get some same fixing-behaviour. But I'm afraid that It is not available till monday.
[On my Systems I couldn't find "gfx.xrender.enabled" (like ericmandel described) just some consimilar settings. Thatwhy I couldnt test this.]
One Idea: If you render the link i posted as example-site (http://downfight.de/attmap/?level=1) AND if you see some rounded area with points and circles: AND if you experience --no-- tooltips at those Points/nonworking Machine, THEN we could have seen the same bug.
Working excample on a good machine, http://prntscr.com/r1h72 Firefox 18.0.1: http://prntscr.com/r1h9k about:config: http://prntscr.com/r1hb6 -> not by me, maybe ATI driver did this. about:config: http://prntscr.com/r1hcr
As far as I know my users just don't play my "nonworking" game or use Crome instead. Only some know the fix with driverupdates and they tell others. A real Fix by Firefox would be awsome!
Your Attachment works on this good machine: http://prntscr.com/r1hi2
Greetings Stefan
Me again. I sent your Attachment to some User who still had my bug. He gave answer: It is not well working on this machine.
My Code: Not working. Your Code: Not working.
My Code: He cant even move the "map" by dragging. Your Code: He is able to move the "text" but only if he klicks like 2-3 cm below it and drags.
Greetings Stefan
The bug reported in https://bugzilla.mozilla.org/show_bug.cgi?id=835064 could be of the same class. Recall that, for us, the problem was solved differently on the Mac than on Debian-derived machines (including Ubuntu), so it's likely not a single problem with a single solution.
On the Ubuntu machine I am testing right now, correct behavior of our Kinetic-enabled app requires setting “gfx.xrender.enabled” (which became available sometime after v14) to “false”. The new suggestion, setting "gfx.canvas.azure.enabled" to "false", has no effect at all on our app running under Ubuntu. It does, however, fix the test page attached to that bug report.
We have one CentOs machine which was not fixed by setting “gfx.xrender.enabled” to “false”. I will test this new suggestion on Monday on that still-broken machine.
Given the fact that our Debian-derived machines were all fixed with the “gfx.xrender.enabled” work-around, but Macs were fixed with an upgrade to v18, the generic class of problem seems to be that Firefox's attempt to optimize rendering actually slows it down. If the problem depends on what type of optimization is being attempted (xrendr vs azure vs Mac), the fix will require side-stepping the specific optimization code.
Regards,
Eric
I'm on a Win7/64 machine, the game map is draggable for me, and the various objects on the map (trees, portals) show tooltips. Also, the example triangle (posted as a problem) and its associated KineticJS tutorial are working as intended. Probably not much help here as I'm not seeing the bugs reported.
does anyone know if this issue has been resolved? I haven't heard of any issues like this in months. (If mousemove was broken in FF, I'm certain that people would be filing more bugs left and right). Please reopen this if it's still an issue.