AsaiaCZ / javascript-joystick

Automatically exported from code.google.com/p/javascript-joystick
0 stars 0 forks source link

Firefox crash when varying joysticks are plugged in and out #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Using JS settimeout(), run setDevice(0) and setDevice(1), say, every 2 
seconds. Also: every 100ms, call getX() and getY(), if one of these 
setDevice(i) returned true. 
2.Plug and unplug at least 2 types of joysticks a few times. 
3.Eventually Firefox will crash.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
0.6.0 over Vista sp2 and Firefox 3.6.3.

Please provide any additional information below.
My *suspicion* is that in Joystick.cpp, the function setDevice()needs to zero 
out joyCaps by calling ZeroMemory(&joyCaps, sizeof(joyCaps)) before calling 
joyGetDevCaps().

I don't have compilation facilities to try this out, so it's speculation. 

(BTW: It might also be nice if that function ensured the passed-in index to be 
less joyGetNumDevs(); but that's another issue.)

Andreas

Original issue reported on code.google.com by Paep...@gmail.com on 13 Jun 2010 at 6:50

GoogleCodeExporter commented 8 years ago
Do you have the same problem in IE?

Original comment by cwoffen...@gmail.com on 15 Jun 2010 at 8:35