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

[MUICHAOS] Entering Swords of Chaos module crashes MBBSEmu #546

Closed Ohmz1290 closed 2 years ago

Ohmz1290 commented 2 years ago

From the main menu after logging in, just entering the module will cause a crash with the following error messages:

Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array. at MBBSEmu.Session.LineBreaker.SendBreakingIntoLines(Byte[] buffer) at MBBSEmu.Session.SessionBase.SendBreakingIntoLines(Byte[] buffer) at MBBSEmu.Session.SessionBase.SendToClient(Byte[] dataToSend) at MBBSEmu.HostProcess.ExportedModules.Majorbbs.outprf() at MBBSEmu.HostProcess.ExportedModules.Majorbbs.Invoke(UInt16 ordinal, Boolean offsetsOnly) at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.ExternalFunctionDelegate(UInt16 ordinal, UInt16 functionOrdinal) at MBBSEmu.CPU.CpuCore.Op_Call() at MBBSEmu.CPU.CpuCore.Tick() at MBBSEmu.HostProcess.ExecutionUnits.ExecutionUnit.Execute(FarPtr entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassState, Queue1 initialStackValues, UInt16 initialStackPointer) at MBBSEmu.Module.MbbsModule.Execute(FarPtr entryPoint, UInt16 channelNumber, Boolean simulateCallFar, Boolean bypassSetState, Queue1 initialStackValues, UInt16 initialStackPointer) at MBBSEmu.HostProcess.MbbsHost.WorkerThread() at System.Threading.Thread.StartCallback()

I tried a few of the more recent builds and reproduced the issue in each one. (011822-01, 010622-9, 010222-3), tried the Win64 and 32bit versions, same result. The last build I know where the module was sort of working was 052021-2. Many things were still crashing the game even in that version, but could at least enter the module and move around the game some.

enusbaum commented 2 years ago

This should be fixed with https://github.com/mbbsemu/MBBSEmu/commit/5f9f4f362bb1b1a95b3eeb8b7492debea614ae1d

Please verify 👍

Ohmz1290 commented 2 years ago

Thanks, it is working now.