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

[GALQFM] Quest for Magic - Module crashes during startup #162

Closed tuday2 closed 3 years ago

tuday2 commented 3 years ago

Module Information

Describe the bug Module crashes during startup

To Reproduce Steps to reproduce the behavior:

  1. Add module to modules.json
  2. Launch MBBSEmu
  3. See Error

Expected behavior Module loads

Screenshots

Critical Exception has occurred:
System.Collections.Generic.KeyNotFoundException: The given key '65535' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at MBBSEmu.Memory.MemoryCore.SetArray(UInt16 segment, UInt16 offset, ReadOnlySpan`1 array)
   at MBBSEmu.Memory.MemoryCore.SetArray(IntPtr16 pointer, ReadOnlySpan`1 array)
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.stzcpy()
   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.AddModule(MbbsModule module)
   at MBBSEmu.Program.Run(String[] args)

Software Information:

tuday2 commented 3 years ago

Deleted *.emu, and bbsgen/bbsusr, mbbsemu.db and now works fine. False Alarm!