TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.16k stars 382 forks source link

TAStudio Arcade Naomi Cannon Spike Can Exceed "Gaps Buffer - Size" Causing Crash #3898

Open ShinobiWannabe opened 5 months ago

ShinobiWannabe commented 5 months ago

Summary

Using TAStudio with Arcade Naomi game Cannon Spike eventually results in a fatal error being thrown. CasualPokePlayer narrowed it down to the savestate exceeding the Gaps Buffer - Size. Increasing that setting mitigates this issue. Assuming that once the savestates grow large enough the issue will occur again.

Discord discussion link https://discord.com/channels/280806848909541376/280813077853765632/1231050515685707826

Error screenshot image

Mitigation Setting image

Bizhawk 2.9.1 MameHawk

cspike xml.zip BK file. needs more branches to error. Cannon Spike + Gun Spike 3 interesting.zip

Full Name: Cannon Spike / Gun Spike Short Name: cspike Resolution: 640x480 Aspect Ratio: 4:3 Framerate: 61.70259 (1073741820 / 17401893)

There are known problems with this system Imperfectly emulated features: graphics, sound THIS SYSTEM DOESN'T WORK The emulation for this system is not yet complete There is nothing you can do to fix this problem except wait for the developers to improve the emulation.

CRC:7c9fea46 SHA:f77c07ae65dfed18c1c4c632c8945be21d02ddaf - 315-6188.ic31 CRC:7a50fab9 SHA:ef79f448e0bf735d1264ad4f051d24178822110f - boot_rom_64b8.ic606 CRC:309a196a SHA:409b50371feb648f10efd6b7ac420bf08d9a3b5a - develop.ic27 CRC:de7cfdb0 SHA:da16800edc4d49f70481c124d487f544c2fa8ce7 - develop110.ic27 ^CRC:d3d57af8 SHA:0eb72c2a20ad8b86d442b77760eab5e89521d469 - epr-21336a.ic27 (BAD DUMP) CRC:9dad3495 SHA:5fb66f9a2b68d120f059c72758e65d34f461044a - epr-21576.ic27 CRC:cedfe439 SHA:f27798bf3d890863ef0c1d9dcb4e7782249dca27 - epr-21576a.ic27 CRC:755a6e07 SHA:7e8b8ccfc063144d89668e7224dcd8a36c54f3b3 - epr-21576b.ic27 ^CRC:4599ad13 SHA:7e730e9452a792d76f210c33a955d385538682c7 - epr-21576c.ic27 (BAD DUMP) CRC:3b2afa7b SHA:d007e1d321c198a38c5baff86eb2ab84385d150a - epr-21576d.ic27 CRC:08c0add7 SHA:e7c1a7673cb2ccb21748ef44105e46d1bad7266d - epr-21576e.ic27 CRC:d2a1c6bf SHA:6d27d71aec4dfba98f66316ae74a1426d567698a - epr-21576g.ic27 CRC:d4895685 SHA:91424d481ff99a8d3f4c45cea6d3f0eada049a6d - epr-21576h.ic27 CRC:cce01f1f SHA:cca17119ad13e3a4ef7cb6902a37b65d6a844aee - epr-21576h_multi.ic27 CRC:969dc491 SHA:581d1eae328b87b67508a7586ffc60cee256f70f - epr-21577a.ic27 CRC:60ddcbbe SHA:58b15096d269d6df617ca1810b66b47deb184958 - epr-21577d.ic27 CRC:cf36e97b SHA:b085305982e7572e58b03a9d35f17ae319c3bbc6 - epr-21577e.ic27 CRC:25f64af7 SHA:99f9e6cc0642319bd2da492611220540add573e8 - epr-21577g.ic27 CRC:fdf17452 SHA:5f3e4b677f0046ce690a4f096b0481e5dd8bb6e6 - epr-21577h.ic27 CRC:6c9aad83 SHA:555918de76d8dbee2a97d8a95297ef694b3e803f - epr-21578a.ic27 CRC:dfd5f42a SHA:614a0db4743a5e5a206190d6786ade24325afbfd - epr-21578d.ic27 CRC:087f09a3 SHA:0418eb2cf9766f0b1b874a4e92528779e22c0a4a - epr-21578e.ic27 CRC:628a27fd SHA:dae7add616b1a2478f00608823e88c3b82a0e78f - epr-21578f.ic27 CRC:55413214 SHA:bd2748365a9fc1821c9369aa7155d7c41c4df43e - epr-21578g.ic27 CRC:7b452946 SHA:8e9f153bbada24b37066dc45b64a7bf0d4f26a9b - epr-21578h.ic27 CRC:71f9c918 SHA:d15af8b947f41eea7c203b565cd403e3f37a2017 - epr-21579.ic27 CRC:33513691 SHA:b1d8c7c516e1471a788fcf7a02a794ad2f05aeeb - epr-21579d.ic27 CRC:a15c54b5 SHA:5c7872244d3d648e4c04751f120d0e9d47239921 - epr-23210.ic22 CRC:fea29cbb SHA:4099f1747aafa07db34f6e072cd9bfaa83bae10e - main_eeprom.bin CRC:ce8d3edf SHA:1df5bb4eb440c221b8f1e5f019b02accc235fc28 - mpr-23198.ic1 CRC:0979392a SHA:7dc433da6f3e47a721a2e86720a65d9752248e92 - mpr-23199.ic2 CRC:e4b2db33 SHA:063bc3789f68be5fcefeeec9e1c8268feb84b7eb - mpr-23200.ic3 CRC:c55ca0fa SHA:e6fde606b9ed4fd195da304a7b57e8b7797e368f - mpr-23201.ic4 CRC:983bb21c SHA:a30f9b09370cceadf11defc85b5acd3e578477e0 - mpr-23202.ic5 CRC:f61b8d96 SHA:a3522963b1e13b809818ffe5a209dd4ce087ec38 - mpr-23203.ic6 CRC:03593ecd SHA:5ef3ccbfb7b1cc85ad352b13d70eefcad2b209f6 - mpr-23204.ic7 CRC:e8c9349b SHA:310f02c5dad84e84362f0f674afa405f7d72f8ce - mpr-23205.ic8 CRC:8089d80f SHA:821f5f24616920bf0ed4c86597c27f6a3c39b8e6 - mpr-23206.ic9 CRC:39f692a1 SHA:14bc86b48a995378b4dd3609d38b90cddf2d7483 - mpr-23207.ic10 CRC:b9494f4b SHA:2f35b25edf5210a82d4b67e639eeae11440d065a - mpr-23208.ic11 CRC:560188c0 SHA:77f14c9a031c6e5414ffa854d20c40115361d715 - mpr-23209.ic12s 000e2010 - rom_board:segam2crypt:key CRC:3ea24b6a SHA:3a730ebcf56e0060fef6b1b02eb2eb7cfb7e61dc - x76f100_eeprom.bin CRC:58e17c23 SHA:19330f906accf1b859f56bbcedc2edff73747599 - zukinver0930.ic25

Repro

  1. Load Cannon Spike
  2. Open TAStudio
  3. Make many branches while progressing through game.
  4. After making a branch modify the input roll, then save a new branch.
  5. Eventually it will throw a fatal exception.

Alternatively Found that if the size is too large you can see more information by attempting to save the change, but keeping old save states. Error with "System.IO.IOException: A single state must not be larger than the buffer"

  1. Load Cannon Spike
  2. Open TAStudio
  3. Open Metadata -> Change the Gaps Buffer Size. To 65mb or 64mb. Keep it low so it still errors.
  4. Click OK
  5. When prompted to "Keep old states" Click Yes. This will error if the save state is too large. image

with single save state error.txt

image

Output with single save state error.txt

Output

Fatal error: InvalidOperationException
EmuHawk has thrown a fatal exception and is about to close.  A movie has been detected.  Would you like to try to save?  (Note Depending on what caused this error, this may or may not succeed)

Error from Metadata-> Savestate History Settings -> Gaps Buffer Size save with "yes" option to Keep Old States prompt.

Output with single save state error.txt

Host env.

Morilli commented 5 months ago

A single savestate being larger than the savestate buffer (64MB) is an issue in itself as this will also limit the amount of total savestates SEVERELY at larger buffer sizes, but this is probably not fixable as we don't have control over the emulated system.

I'd say the most useful thing to do here is make sure that the default or initial settings are reasonable for the system and not proceed otherwise.

nattthebear commented 5 months ago

There are no reasonable defaults that would cover both 50kB savestates and 50MB savestates; could we be more granular on MAME depending on core?