authorblues / bizhawk-shuffler-2

A script to randomly shuffle between games played in Bizhawk, with plugins to enhance the experience
MIT License
58 stars 21 forks source link

PlayStation game combination "Sprashfecta" crashes the Shuffler #58

Closed Dereklander closed 2 years ago

Dereklander commented 2 years ago

When attempting to use the Bizhawk Shuffler with the PlayStation games Spyro 1,2,3 and Crash 1,2,3 it constantly crashes on a random game swap and proceeds to give out an error output code. I believe I have set the shuffle up correctly and spent the past hour and a half trying to get it to work with no progress.

Steps to reproduce the behavior:

  1. Start the shuffler with Spyro 1,2,3 and Crash 1,2,3
  2. Wait for the shuffler to change games. It takes around 5-15 games swaps to fail
  3. Error occurs and the shuffler is stopped

    • OS: Windows 10 pro
    • Bizhawk Version: 2.6.2

Output: deleting savestates! NLua.Exceptions.LuaException: unprotected error in call to Lua API (0) at NLua.Lua.PanicCallback(IntPtr luaState) at lua_error(lua_State ) at NLua.ObjectTranslator.throwError(IntPtr luaState, Object e) at NLua.Lua.SetPendingException(Exception e) at NLua.LuaMethodWrapper.call(IntPtr luaState) at NLua.MetaFunctions.runFunctionDelegate(IntPtr luaState) at lua_resume(lua_State , Int32 ) at BizHawk.Client.EmuHawk.Win32LuaLibraries.ResumeScript(LuaFile lf) at BizHawk.Client.EmuHawk.LuaConsole.<>c__DisplayClass61_1.b__1() at BizHawk.Client.Common.LuaSandbox.Sandbox(Action callback, Action exceptionCallback)

message.log

Screenshots 4 5 1 2 3

Sorry for the poor posting. Since I'm new to GitHub I assume my text is probably seen as amateur or lacking some important details. Hell, this may not even be a true "bug" but just a failure on my part. If so I am sorry; Please message me if more info is needed.

kalimag commented 2 years ago

@Dereklander As you closed the issue, did you find the cause of the problem?

Dereklander commented 2 years ago

@kalimag Yes, I did! I probably should have posted a solution to the problem before closing it. The problem was caused because of how the Bizhawk shuffler handles .bin.ECM files. When starting the Bizhawk emulator on its own it can easily load in .bin, .cue, and .bin.ECM files. However once connected to the shuffler script the .bin and .cue files are fine but the special type .bin.ECMfile is very unstable. The shuffler can load into it a few times but since .bin.ECM is a compressed file type eventually the shuffler will have issues loading back into it and causing it to crash and fail. Looking at screenshot 4 you can clearly see that Crash bandicoot 1 is a bin.ECM file type. This is common for Crash bandicoot 1 since it is a very large game but the shuffler can't handle this file type in a stable manner.

The solution I have found is using a program that decompresses the .bin.ECM file to a standard .Bin file. Afterward, I let the program run by itself and it got all the way to about 1200 swaps with no issue. It's a very weird solution since Bizhawk will run the rom just fine but the shuffler finds it very unstable. So case in point: Do Not use .bin.ECM files with the Bizhawk shuffler Script!