space-wizards / RobustToolbox

Robust multiplayer game engine, used by Space Station 14
https://spacestation14.io
Other
537 stars 395 forks source link

Assert gets tripped when holding down backspace in a line edit #5099

Open ShadowCommander opened 5 months ago

ShadowCommander commented 5 months ago

Assert gets tripped when holding down backspace in the debug history line edit. The repeat keybind trips the assert.

https://github.com/space-wizards/RobustToolbox/blob/3500abfd47214f614607eb5037c44a6f6ed5a48a/Robust.Client/UserInterface/UserInterfaceManager.Input.cs#L117-L118

Robust.Shared.Utility.DebugAssertException: Exception of type 'Robust.Shared.Utility.DebugAssertException' was thrown.
   at Robust.Shared.Utility.DebugTools.Assert(Boolean condition) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Shared\Utility\DebugTools.cs:line 37
   at Robust.Client.UserInterface.UserInterfaceManager.KeyBindDown(BoundKeyEventArgs args) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\UserInterface\UserInterfaceManager.Input.cs:line 118
   at Robust.Client.UserInterface.UserInterfaceManager.OnUIKeyBindStateChanged(BoundKeyEventArgs args) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\UserInterface\UserInterfaceManager.Input.cs:line 451
   at Robust.Client.Input.InputManager.SetBindState(KeyBinding binding, BoundKeyState state, Boolean uiOnly) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\Input\InputManager.cs:line 411
   at Robust.Client.Input.InputManager.DownBind(KeyBinding binding, Boolean uiOnly, Boolean isRepeat) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\Input\InputManager.cs:line 349
   at Robust.Client.Input.InputManager.KeyDown(KeyEventArgs args) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\Input\InputManager.cs:line 283
   at Robust.Client.GameController.KeyDown(KeyEventArgs keyEvent) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\GameController\GameController.Input.cs:line 12
   at Robust.Client.Graphics.Clyde.Clyde.DispatchSingleEvent(DEventBase ev) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\Graphics\Clyde\Clyde.Events.cs:line 47
   at Robust.Client.Graphics.Clyde.Clyde.DispatchEvents() in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\Graphics\Clyde\Clyde.Events.cs:line 31
   at Robust.Client.Graphics.Clyde.Clyde.ProcessInput(FrameEventArgs frameEventArgs) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\Graphics\Clyde\Clyde.Windowing.cs:line 392
   at Robust.Client.GameController.Input(FrameEventArgs frameEventArgs) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\GameController\GameController.cs:line 489
   at Robust.Client.GameController.<StartupContinue>b__58_2(Object sender, FrameEventArgs args) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\GameController\GameController.cs:line 240
   at Robust.Shared.Timing.GameLoop.Run() in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Shared\Timing\GameLoop.cs:line 187
   at Robust.Client.GameController.ContinueStartupAndLoop(DisplayMode mode) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\GameController\GameController.Standalone.cs:line 162
   at Robust.Client.GameController.GameThreadMain(DisplayMode mode) in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\GameController\GameController.Standalone.cs:line 147
   at Robust.Client.GameController.<>c__DisplayClass100_0.<Run>b__0() in C:\Users\Legionare\RiderProjects\space-station-14\RobustToolbox\Robust.Client\GameController\GameController.Standalone.cs:line 106
moonheart08 commented 5 months ago

technically a duplicate of #5095 but this is the better issue due to having a backtrace, I'll be closing that one.

ElectroJr commented 5 months ago

5100 partially fixes it, but does not fix the assert getting tripped if you switch focus from one control to another.

TemporalOroboros commented 2 months ago

I've managed to trigger the same assert by pressing spacebar with "walk" bound to it. Not sure if the rebind is necessary as testing on my machine is tedious (15 minute client startup time).