Skip to content

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

Description

@GoogleCodeExporter
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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions