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

[NTHORDER] Warlords of Order & Chaos - Logging off MBBSemu crashes system with only this module loaded #124

Closed tuday2 closed 4 years ago

tuday2 commented 4 years ago

Module Information

Describe the bug Only load NTHORDER module and crashes when you logoff

To Reproduce Steps to reproduce the behavior:

  1. Load NTHORDER module in moduleConfig.json
  2. Launch MBBSEmu
  3. Telnet into system
  4. Logoff using "X" and "Y"
  5. See error

Expected behavior Proper logoff and ready for connections

Screenshots

Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown Exported Function Ordinal in MAJORBBS: 364')
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.Module.MbbsModule.Execute(IntPtr16 entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue`1 initialStackValues, UInt16 initialStackPointer)
   at MBBSEmu.HostProcess.MbbsHost.CallModuleRoutine(String routine, Action`1 preRunCallback, UInt16 channel)
   at MBBSEmu.HostProcess.MbbsHost.RemoveSession(UInt16 channel)
   at MBBSEmu.HostProcess.MbbsHost.RemoveSessions(Predicate`1 match)
   at MBBSEmu.HostProcess.MbbsHost.WorkerThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ThreadHelper.ThreadStart()

Software Information:

enusbaum commented 4 years ago

Ordinal MAJORBBS.364 is ISUIDC which determines if the specified character is a valid user-id character.

Because MBBSEmu doesn't enforce limits on User-IDs, we can always return 1 for YES