flibitijibibo / FNA-MGHistory

FNA - Accuracy-focused XNA4 reimplementation for open platforms
http://fna-xna.github.io/
246 stars 37 forks source link

Microsoft.Xna.Framework.Input.GamePad.INTERNAL_AddInstance throws "An element with the same key already exists in the dictionary" #313

Closed QuarkRobot closed 9 years ago

QuarkRobot commented 9 years ago

This happens on a 2011 Mac Mini with Yosemite 10.10.4 with a Bluetooth Logitech keyboard K760 and Apple Magic Trackpad connected.

An element with the same key already exists in the dictionary. 
at System.Collections.Generic.Dictionary`2[System.Int32,System.Int32].Add (Int32 key, Int32 value) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Input.GamePad.INTERNAL_AddInstance (Int32 dev) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.SDL2_GamePlatform.BeforeInitialize () [0x00000] in <filename unknown>:0 
at Microsoft.Xna.Framework.Game.DoInitialize () [0x00000] in <filename unknown>:0 
at Microsoft.Xna.Framework.Game.Run () [0x00000] in <filename unknown>:0 
at WindowsGame3.Program.Main (System.String[] args) [0x00000] in <filename unknown>:
flibitijibibo commented 9 years ago

Unfortunately without debug information this makes it hard to tell what the actual issue is, but the good news is that I fixed this already:

https://github.com/flibitijibibo/FNA/commit/042d9cbe8f6133cce1a852d6848f853d2dcb46f4

Is this the latest revision?

QuarkRobot commented 9 years ago

Sorry, no it was from about two days before this fix. Thanks, Ethan.