Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

PlayerIndex incorrect #1

Open
NoelFB opened this issue Mar 1, 2018 · 2 comments
Open

PlayerIndex incorrect #1

NoelFB opened this issue Mar 1, 2018 · 2 comments
Labels
bug Something isn't working crash

Comments

@NoelFB
Copy link
Owner

NoelFB commented Mar 1, 2018

Not sure what causes this or how it becomes invalid. Error log:

2/22/2018 12:32:21 PM
System.InvalidOperationException: An invalid operation was performed. Is your PlayerIndex correct?
   at Microsoft.Xna.Framework.Input.GamePad.GetState(PlayerIndex playerIndex, GamePadDeadZone deadZoneMode)
   at Monocle.MInput.GamePadData.Update()
   at Monocle.MInput.Update()
   at Monocle.Engine.Update(GameTime gameTime)
   at Celeste.Celeste.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at Monocle.Engine.RunWithLogging()```
@NoelFB NoelFB added bug Something isn't working crash labels Mar 1, 2018
@A1rPun
Copy link

A1rPun commented Mar 2, 2018

The GetState method will throw this error if the gamepad is disconnected. I assume GetState gets called after GamePad.IsConnected is checked in the code.
Im not sure how you keep track of playerindexes but if that's implemented well then this bug is a rare occurrence IMO.

Try different controllers maybe to exclude hardware failures?

@AgentSmith8
Copy link

For me calibrating the controller via Steam fixed the problem (Setting > Controller > General Controller Settings). I only had this issue with Celeste, so the controller seemed to be calibrated just fine. This did the trick, though.

Hope this helps others as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working crash
Projects
None yet
Development

No branches or pull requests

3 participants