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

[MJWMUT] Mutants! - Btrieve Error when enumerating High Scores after Nightly Cleanup #31

Closed enusbaum closed 3 years ago

enusbaum commented 4 years ago

After Mutants! runs its nightly cleanup routine and establishes a high score list, when you go to enumerate the high scores the following btrieve error is thrown:

Unhandled exception. System.Exception: Unsupported Btrieve Query Option: 57
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.qnpbtv()

I suspect the issue is happening on the High Score list after a GetLast to get the HIGHEST score, it's then performing a GetPrevious (7 == GetPrevious, 50 == Keyed) to get the NEXT highest score.

We need to add support for GetPrevious in both qnpbtv() and the BtrieveFileProcessor.cs

tuday2 commented 4 years ago

@enusbaum i think this one should be tagged Btrieve

tuday2 commented 3 years ago

Also happens in Ringmasters, execute "LIST" command

Unhandled exception. System.Exception: Unsupported Btrieve Query Option: 57
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.qnpbtv()
   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.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()
tuday2 commented 3 years ago

Updated Error Message -- MBBSEmu Build: 110920-7

Unhandled exception. System.Exception: Unsupported Btrieve Query Option: GetKeyPrevious
   at MBBSEmu.HostProcess.ExportedModules.Majorbbs.qnpbtv()
   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(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.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()