greggler {l Wrote}:any advice on what i can i do to gather more info and hunt this down in the code?
while(sizeof(event) == read(info.fd, &event, sizeof(event)))
printf("info.fd = %i\n", info.fd);
while(sizeof(event) == read(info.fd, &event, sizeof(event)))
greggler {l Wrote}:i think the problem is inside of the sixad driver and also CirrDeviceLinux.cpp is not being careful
traced it down to line 1720.
info.persistentData.JoystickEvent.Axis[event.number] = event.value;
the event.number must be < NUMBER_OF_AXES which is 6 and the actual value can be in the 20s
so, it was stomping on memory past the end of the array and that is what was zeroing out the fd.
i protected that array index with a check on max safe value and it did resolve the problem with freezing. no more null file descriptor but also no happy working 2 joysticks.
further debugging shows that the buttons presses on the sixaxis are arriving as event type JS_EVENT_AXIS rather than JS_EVENT_BUTTON so i'll see about working with the sixad folks.
thanks for the help though in sending me on the right path
mwcmwc {l Wrote}:Hi guys,
I started using two controllers this week, and have encountered the same problem. Running windows 7 64 bit and latest version of STK. Controllers are generic dual wired controllers, but when using both to play, have a problem at beginning of race, freezes and stops responding.
Can you walk me through the fix, as i am not accustomed to going to the guts of programs, and i don't want to mess it all up.Thanks
greggler {l Wrote}:i think the problem is inside of the sixad driver and also CirrDeviceLinux.cpp is not being careful
traced it down to line 1720.
info.persistentData.JoystickEvent.Axis[event.number] = event.value;
the event.number must be < NUMBER_OF_AXES which is 6 and the actual value can be in the 20s
so, it was stomping on memory past the end of the array and that is what was zeroing out the fd.
i protected that array index with a check on max safe value and it did resolve the problem with freezing. no more null file descriptor but also no happy working 2 joysticks.
further debugging shows that the buttons presses on the sixaxis are arriving as event type JS_EVENT_AXIS rather than JS_EVENT_BUTTON so i'll see about working with the sixad folks.
thanks for the help though in sending me on the right path
mwcmwc {l Wrote}:Hey guys,
Would really like some help debugging this. Sorry you have been so busy with holidays and such. Anyway....
Users browsing this forum: No registered users and 1 guest