mbbsemu / MBBSEmu

The MajorBBS Emulation Project is an Open Source, Cross-Platform emulator for easily running The MajorBBS & Worldgroup Modules
https://www.mbbsemu.com
MIT License
134 stars 13 forks source link

[WCCMMUD] Majormud - Full screen editor crashes when moving cursor up and down too fast #554

Open fletcherm opened 2 years ago

fletcherm commented 2 years ago

Module Information

Describe the bug

Holding down the up or down arrow keys, reversing direction, and generally forcing the cursor to move fast will sometimes cause mbbsemu to hard crash.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Majormud character. The full screen editor will pop up.
  2. Hold down the down arrow key for a while, then quickly switch to the up key and hold it down, then down key, then up key, etc. until the board crashes

Expected behavior

The focused field should change with the arrow key direction and not crash the board.

Stacktrace

Here's what is printed in the console output.

mbbsemu    | Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
mbbsemu    |    at MBBSEmu.HostProcess.HostRoutines.FsdRoutines.InFullScreenDisplay(SessionBase session)
mbbsemu    |    at MBBSEmu.HostProcess.HostRoutines.FsdRoutines.ProcessSessionState(SessionBase session, Dictionary`2 modules)
mbbsemu    |    at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
mbbsemu    |    at System.Threading.Thread.StartCallback()

Software Information: