Closed Morilli closed 4 years ago
What emulation core is being used?
snes with BSNES core
The screencap seems to be an SEHException
which would be from Rust, but an InvalidOperationException
from TAStudio looks like the bug fixed by 757ac4e27. Can you reproduce any crash on a dev build from today?
Well I'm not managing to reproduce this consistently currently, but I did manage to reproduce this error, and this time even with a stack trace!
************** Ausnahmetext **************
System.Runtime.InteropServices.SEHException (0x80004005): Eine externe Komponente hat eine Ausnahme ausgelöst.
bei Bizhawk.BizInvokeProxyWaterboxHostNative.wbx_load_state(IntPtr , ReadCallback , IntPtr , ReturnData )
bei BizHawk.Emulation.Cores.Waterbox.WaterboxHost.LoadStateBinary(BinaryReader br) in D:\GitHub\BizHawk\src\BizHawk.Emulation.Cores\Waterbox\WaterboxHost.cs:Zeile 307.
bei BizHawk.Emulation.Cores.Nintendo.SNES.LibsnesCore.LoadStateBinary(BinaryReader reader) in D:\GitHub\BizHawk\src\BizHawk.Emulation.Cores\Consoles\Nintendo\SNES\LibsnesCore.IStatable.cs:Zeile 18.
bei BizHawk.Client.EmuHawk.TAStudio.LoadState(KeyValuePair`2 state)
bei BizHawk.Client.EmuHawk.TAStudio.StartAtNearestFrameAndEmulate(Int32 frame, Boolean fromLua, Boolean fromRewinding)
bei BizHawk.Client.EmuHawk.TAStudio.GoToFrame(Int32 frame, Boolean fromLua, Boolean fromRewinding)
bei BizHawk.Client.EmuHawk.TAStudio.TasView_MouseDown(Object sender, MouseEventArgs e)
bei System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
bei BizHawk.Client.EmuHawk.InputRoll.OnMouseDown(MouseEventArgs e)
bei System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Guess this is just the classic part where it tries to load a savestate that doesn't exist and just throws in some way.
Note that when bizhawk crashes immediately by doing frame advance + going one frame back, this seems to be the line that fails it: https://github.com/TASEmulators/BizHawk/blob/afbce436cd5805395ddaa6eecbb91f7b60842347/waterbox/waterboxhost/src/memory_block/mod.rs#L946
Have you edited the bk2 by hand (treating it as a zipfile) to remove the greenzone file?
The .bk2 doesn't contain any greenzone, so no.
Two other users reported an SEHException
when seeking to frame 0 with TAStudio. Both were using BSNES. I tried to repro but couldn't, will try again on Windows.
I was able to reproduce easily on Windows. Saving and then loading a state seems to be broken. You don't need TAStudio open or a movie open.
I'm not sure if it literally affects all savestates, but it seems that way. I've tested saving a state on frame 0, 1, 2, and a miscellaneous one later into the game.
Tested with BizHawk 2.5 and 99599335
Here's a basic workflow for reproducing with no config (or existing save files, though it probably doesn't matter):
Emulation > Pause
File > Open ROM
and open an SNES ROM (in my case, Donkey Kong Country or Super Mario World)
Config > Cores > SNES > BSNES
Emulation > Reboot Core
File > Save State > 1
to save slot 1File > Load State > 1
to load slot 1This does not seem to occur in 2.4.2.
Also worth noting:
Anyone able to reproduce this on linux?
I tried to test this by using WSL, but it seems there are lots of issues in the linux version, starting with the BSNES core not even working at all, so I cannot test this right now.
Huh, bsnses worked in linux last I checked?
Yeah this might very well all be due to me using WSL2 instead of a real linux system; I just know it's throwing tons of errors and not really working at all.
Still cannot repro on Linux with RetroEdit's more detailed steps. And though it's true that WSL is different from a real Linux system, natt was using it successfully during development. I've added it to my to-do list of distros.
All of my linux work has been WSL2, but anyway that's orthogonal to this issue here. Seems like it's broken on W10 and working on linux (so long as you can get the hawk itself working on linux to start.)
This is not unexpected as there's a difference to how the waterboxhost handles certain BSNES things on windows and linux.
@RetroEdit Could you test c86f1e1e98d1c3c45ec99cd0d2f38324db0fa3de and see if the issue still exists? @YoshiRulz Could you do a light regression on bsnes state-ing with c86f1e1e98d1c3c45ec99cd0d2f38324db0fa3de? I doubt anything broke (on linux), but it's nice to be sure.
Wasn't able to get a crash with the branch.
With short testing, I couldn't get a crash on that commit anymore. Seems to have fixed the issue.
Incorporated into master as 98ad14ff47a0206756f01f4afbe6ae539a612582
Summary
Trying to seek around in a .bk2 file made from an earlier version of BizHawk (precisely 2.4.0) crashes bizhawk consistently with varying messages depending on what you do exactly, I've gotten at least 3 different variants so far.
Repro
Open this .bk2 file in TAStudio (Note: I'm using this rom patched on vanilla super mario world.
It should honestly be super easy to crash bizhawk this way, for me it has even worked to advance one frame and then go back one frame for bizhawk to crash immediately.
Output
have gotten an InvalidOperationException and some stacktrace in another instance too; don't have screenshot of the stacktrace tho.
Host env.
edit: screencap link -> embed --yoshi