Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Axis out of Range (Assertion using a Joystick with many axes)  (Read 813 times)

SolidSnake

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 3
    • View Profile

Hello everybody,

I am able to run my Ogre3d application in buffered input mode using OIS but once I move a controller axis, it throws this assertion:
 
Quote from: Microsoft Visual C++ Runtime Library
Assertion Failed: [...]myapp.exe
File: ..\src\win32\Win32JoyStick.cpp
Line: 244

Expression: axis >= 0 && axis < (int)mState.mAxes.size() && "Axis out of Range!"

[...]
I'm using a 3rd-Party PS3-Controller-Driver, wich is working correctly (in every game and every app). But the driver initializes solid eight axes, while most of them are unused.
My suggestion is, that OIS only supports JoySticks until a specific number of axes. Right? How to fix it? (I'm using a self compiled copy of ogre)

Best Regards,

Andre
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2653
    • View Profile
    • http://www.wreckedgames.com
Re: Axis out of Range (Assertion using a Joystick with many axes)
« Reply #1 on: May 04, 2010, 05:31:09 PM »

Slider detection is done via enumeration. What PS3 driver are you using exactly? I might be able to reproduce and perhaps find a work around.
Logged

SolidSnake

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 3
    • View Profile
Re: Axis out of Range (Assertion using a Joystick with many axes)
« Reply #2 on: May 05, 2010, 12:58:39 PM »

It's the MotioninJoy driver: http://www.motioninjoy.com/
Actualy there are other drivers but it's the only one working under Windows 7.
It might be very difficult to reproduce since the driver is quite recalcitrant, at least the version I've got. The latest version is said to be easier to install.

Viewing the gamecontroller properties in the (german ^^) windows control panel it looks like this:



As you can see all of the available axes are initialized, which micht cause the assertion.


Best Regards,

Andre
« Last Edit: May 05, 2010, 01:04:29 PM by SolidSnake »
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2653
    • View Profile
    • http://www.wreckedgames.com
Re: Axis out of Range (Assertion using a Joystick with many axes)
« Reply #3 on: May 05, 2010, 05:50:30 PM »

I misread your initial post. Thought you were talking about sliders.

OIS enumerates all axes of a joystick up to a maximum of 24. I think, what has failed is setting the uAppData member of the device. The driver is maybe broken there. You can verify this by digging around the enumeration with the debugger. If you find that is the case, it may be worth reporting that issue with the driver developer.

I'd try that driver, but I think it requires installing some items I'd rather not (libusb driver).
Logged

SolidSnake

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 3
    • View Profile
Re: Axis out of Range (Assertion using a Joystick with many axes)
« Reply #4 on: May 06, 2010, 12:25:28 AM »

Quote
I'd try that driver, but I think it requires installing some items I'd rather not (libusb driver).
I wouldn't recommend installing the driver either unless you really want to play with a PS3 controller.
It is an unsigned driver wich is treated by Windows 7 similar to a virus ("Do you REALLY want to install this unsigned driver? This can destroy your computer!")  ;)

Quote
OIS enumerates all axes of a joystick up to a maximum of 24. I think, what has failed is setting the uAppData member of the device. The driver is maybe broken there. You can verify this by digging around the enumeration with the debugger. If you find that is the case, it may be worth reporting that issue with the driver developer.
Considering that the controller works with OIS when switched to XBOX360-Controller-Emulation (then there is a reasonable ammount of axes) I would not go so deep into it. I was just thinking that OIS may have a little problem here but if it supports up to 24 axes I'm obviously wrong.
Thinking about it again I remember that the driver actually did not work that well in any game unless switched to XBOX360-Controller-Emulation, even in those wich support standard controllers. This suggests again that the driver itself is a bit buggy.

Thanks for the support!

Best Regards,

Andre
Logged