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

Shuffler sometimes stops working when loading Gameboy game #70

Closed CurtDogg closed 9 months ago

CurtDogg commented 10 months ago

I've been trying to use the shuffler with SNES, GB, and GBA games, but every now and again when loading a GB game, I get the following error in the Lua Console:

"NLua.Exceptions.LuaScriptException: A .NET exception occured in user-code System.InvalidOperationException: Savestate buffer size mismatch! at BizHawk.Emulation.Cores.Nintendo.Sameboy.Sameboy.LoadStateBinary(BinaryReader reader) at BizHawk.Client.Common.ZipStateLoader.GetLump(BinaryStateLump lump, Boolean abort, Action2 callback, Boolean isZstdCompressed) at BizHawk.Client.Common.ZipStateLoader.GetLump(BinaryStateLump lump, Boolean abort, Action1 callback) at BizHawk.Client.Common.ZipStateLoader.GetCoreState(Action1 callbackBinary, Action1 callbackText) at BizHawk.Client.Common.SavestateFile.Load(String path, IDialogParent dialogParent) at BizHawk.Client.EmuHawk.MainForm.LoadState(String path, String userFriendlyStateName, Boolean suppressOSD) at BizHawk.Client.Common.SaveStateLuaLibrary.Load(String path, Boolean suppressOSD) "

Steps to reproduce the behavior:

  1. DRun the shuffler with all my games
  2. Sometimes when loading a GB ROM, the shuffler will stop shuffling games, and stay on the loaded game without switching. The SNES/GBA roms will never produce this issue.
  3. The Lua Console will display the above error

Windows 11, BizHawk Version 2.9.1 (x64)

When loading the GB game, it will sometimes disable the audio too, until I go into the Sound Config and re-enable "Sound Master Enable"

Here are the config and message log files https://drive.google.com/file/d/1qvIMQ38nIAp7Ng891og-b4K8b3qs3Q_P/view?usp=sharing

image

kalimag commented 10 months ago

Do all the roms work correctly when you load them outside of the shuffler?

Did you change any settings after starting the run, e.g. the preferred core for GB, SGB mode, or any other GB settings?

Does this happen in a brand new copy of BizHawk without changed settings (other than controllers etc.) or imported firmware?

If possible, please upload a copy of your bizhawk-shuffler-2/games/.savestates folder and the config.ini in your BizHawk folder after the problem has occurred again (note: the config.ini may contain names of files and directories you have opened in BizHawk).

kalimag commented 9 months ago

Closing this as could not reproduce.

My guess is changed sync settings during the run, not much we can do about that.