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

[MJWMUT] Mutants! - Module Crash #101

Closed tuday2 closed 3 years ago

tuday2 commented 3 years ago

Module Information

Describe the bug Module will crash with error message

To Reproduce Steps to reproduce the behavior:

  1. Load Mutants! module
  2. Play game, kill monsters

Expected behavior Module runs without crashing

Screenshots

Critical Exception has occurred:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown Exported Function Ordinal in MAJORBBS: 339')
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly)
   at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal)
   at MBBSEmu.CPU.CpuCore.Tick()
   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.AddModule(MbbsModule module)
   at MBBSEmu.Program.Run(String[] args)

Software Information:

enusbaum commented 3 years ago

Ordinal MAJORBBS.339 is hexopt which retrieves a hex option from the specified MCV file.

image

Best I can tell at the moment, it just returns a 2 byte ushort value (0-0xFFFF), or between the boundaries specified.

enusbaum commented 3 years ago

While this will be fixed by #122 , Mutants! (MJWMUT) will still need ACCBB as it tries to look up the Mutants! Link user. This is the same issue as #113

We can confirm the fix here and leave #113 open for the ACCBB fix.