Forums

Full Version: Crash with Saitek Pro Flight Yoke System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I've been playing VDrift with a set of Saitek Pro Flight Yoke & Rudder Pedals (which is a strange experience but great fun). I played with the 2012-07-22 release on Windows 7 and everything worked fine.

Now I downloaded the 2014-09-26 version and I can't set all the axes correctly, and as soon as I flick a button on the yoke, the application crashes straight away.

(I don't know what else to report because I'm not familiar with the inner workings of the app, but I am a software developer so feel free to ask complicated things from me. Smile)
There is a LOG file in C:\Users\"Your USer"\AppData\Roaming\VDrift

see why it crashes.cheers
Upload your vdrift.config and controls.config and log.txt as mentioned by slickx.

If you could build vdrift and get a backtrace, that would be awesome of course.
I started out cleanly with no main config, no controls config. And straight away in the main menu if I press any button on the joystick, it crashes. (It also crashes if I do it on the controls setup screen, during a race, every single time, but this is the simplest scenario.)

I'll try to do a build too but it'll take some time, my area is Java and I've never coded or built in C on Windows, only on *nix systems.
I've managed to further narrow down the source of the problem to the fact that I've got two joysticks (the yoke and the pedals).

If I remove the pedals, everything works fine.

I also checked the exception code, and it's access violation. Maybe event.jbutton.which returns a number that is different from 0 or 1? I noticed that in eventsystem::Init() the joystick vector is simply built in the order the controllers are enumerated but doesn't check SDL_Joystick.instance_id. But in eventsystem:TonguerocessEvents() it uses the value of event.jbutton.which as an index into the joystick vector.

It could be a complete red herring though.
(09-28-2014, 05:44 PM)biziclop Wrote: [ -> ]I've managed to further narrow down the source of the problem to the fact that I've got two joysticks (the yoke and the pedals).

If I remove the pedals, everything works fine.

I also checked the exception code, and it's access violation. Maybe event.jbutton.which returns a number that is different from 0 or 1? I noticed that in eventsystem::Init() the joystick vector is simply built in the order the controllers are enumerated but doesn't check SDL_Joystick.instance_id. But in eventsystem:TonguerocessEvents() it uses the value of event.jbutton.which as an index into the joystick vector.

It could be a complete red herring though.
You are correct. The instance id is not equal to the device id. From testing here they turned out in reverse order for me, first device instance_id being 1 and second 0.

I am wondering why it worked before? Anyway, I'll push a fix, just need to do some more testing.
Maybe the previous version of SDL returned them in a different order, that's all I can think of.
(09-29-2014, 12:52 PM)biziclop Wrote: [ -> ]Maybe the previous version of SDL returned them in a different order, that's all I can think of.

I've uploaded a new exe here: http://sourceforge.net/projects/vdrift/f...z/download
Really interesting stuff.