ConcreteMC / Alex

A Minecraft client written in C# aimed at compatibility with MC:Java & MC:Bedrock
Mozilla Public License 2.0
590 stars 46 forks source link

Resetting controls crashes the client #102

Closed AndreasHGK closed 3 years ago

AndreasHGK commented 3 years ago

Whenever I try to reset my controls, the client crashes The following error is displayed in the terminal:

Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key 'Alex:TakeScreenshot' was not present in the dictionary.
   at System.Collections.Generic.Dictionary2.get_Item(TKey key)
   at System.Collections.ObjectModel.ReadOnlyDictionary2.get_Item(TKey key)
   at Alex.Gamestates.MainMenu.Options.ControlOptionsState.ResetControls()
   at RocketUI.Button.OnFocusActivate()
   at RocketUI.GuiFocusHelper.set_FocusedElement(IGuiControl value)
   at RocketUI.GuiFocusHelper.UpdateInput()
   at RocketUI.GuiManager.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.SortingFilteringCollection1.ForEachFilteredItem[TUserData](Action2 action, TUserData userData)
   at Alex.Alex.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Alex.Program.LaunchGame(LaunchSettings launchSettings)
   at Alex.Program.Main(String[] args)
zsh: abort      ./Alex

Tested on both Windows 10 and MacOS monterey, both times crashed. Being in a server or not also does not seem to have any effect on this, both times it crashed