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
126 stars 14 forks source link

[WCCMMUD] Majormud - Game sysop's WCCMMUD.INI full screen editor crashes at 80 characters #545

Open fletcherm opened 2 years ago

fletcherm commented 2 years ago

Module Information

Describe the bug

Using the full screen editor to edit WCCMMUD.INI (in the sysop menu) crashes the system if the file is > 79 characters.

To Reproduce Steps to reproduce the behavior:

  1. Ensure your WCCMMUD.INI file on disk is > 79 characters.
  2. Ensure your BBS user has the WCCSYSOP key - this grants access to Majormud's Sysop menu
  3. Enter MajorMud and type 'sysop' to enter the sysop menu
  4. Type E to edit the WCCMMUD.INI file
  5. Full screen editor will briefly show, it will look all messed up, and the board will crash with this stacktrace in the background:
mbbsemu    | Unhandled exception. System.InvalidOperationException: Sequence contains no matching element
mbbsemu    |    at System.Linq.ThrowHelper.ThrowNoMatchException()
mbbsemu    |    at MBBSEmu.HostProcess.Fsd.FsdUtility.SetAnswers(List`1 answers, List`1 fields)
mbbsemu    |    at MBBSEmu.HostProcess.HostRoutines.FsdRoutines.EnteringFullScreenDisplay(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()

Through trial and error I found that files <= 79 don't crash, but > 79 character do.

For example: this file content (79 characters) does not crash:

# GENERAL
BLANK_LASTNAME_ALLOWED=1
CODEC_OF_TWINKS=78
MAXIMUM_BANK_BALANCE=0
B

And this content (80 characters) does crash:

# GENERAL
BLANK_LASTNAME_ALLOWED=1
CODEC_OF_TWINKS=78
MAXIMUM_BANK_BALANCE=0
BO

Expected behavior

The board does not crash for content > 79 characters.

Software Information:

fletcherm commented 2 years ago

@synacktic I'd appreciate if you could try this with your WG reference system. Mine is all messed up right now.

The game menu does warn "only [edit] if [this file] is small," so being too long could be a known problem...but a hard hard hard crash like this, with that stacktrace, would surprise me.

Would be interesting to see what you get on a reference system.