midoshouse / ootr-multiworld

An alternative implementation of multiworld for the Ocarina of Time randomizer
https://midos.house/mw
MIT License
9 stars 1 forks source link

BizHawk receives duplicate items after reset #26

Closed fenhl closed 1 year ago

fenhl commented 1 year ago

I am receiving reports (including video evidence) where players are receiving duplicates of some items after saving and resetting. These duplicates may also prevent subsequent items from being received. Tentatively labelling this as BizHawk because all reports so far were on that platform and reports started coming in after the release of version 9.0.2, which made significant changes to the BizHawk frontend.

Workaround

Watch for unexpected items received after a reset. If you do receive any, do not save the game, and try using another type of reset (soft reset, hard reset, or reboot core) from the “Emulation” menu.

fenhl commented 1 year ago

This bug seems to be specific to seeds rolled on Dev-R. Neither the main Dev branch nor my own branch seem to be affected, despite my branch being based on Dev-R and Dev-R being based on main Dev. Further investigation is needed, but for now, not rolling seeds on Dev-R is a workaround.

fenhl commented 1 year ago

Got a report of this on main Dev. I'll have to check if this can be reproduced now, and if so, bisect the version when it started.

fenhl commented 1 year ago

I have now been able to reproduce on main Dev with the following steps:

  1. Generate a 2-world seed on Dev 7.1.175 using this plando:
    {
        "settings": {
            "open_forest": "open",
            "spawn_positions": [
                "child"
            ]
        },
        "entrances": {
            "Child Spawn -> KF Links House": "KF Midos House"
        },
        "locations": {
            "KF Midos Top Left Chest": {
                "item": "Piece of Heart",
                "player": 1
            }
        }
    }
  2. As player 2, open the top left chest in Mido's house.
  3. As player 1, after receiving the heart piece, save.
  4. As player 1, use the “Hard Reset” item from the “Emulation” menu.
  5. After going back into the file, player 1 receives a duplicate of the heart piece.
fenhl commented 1 year ago

Things are getting weirder: If I load https://ootrandomizer.com/seed/get?id=1472438, have everyone go child, savewarp, and open the top left chest in Mido's house, the issue only happens on soft resets. Meanwhile, the steps in the previous comment only reproduce the issue with hard resets. If anyone can find out a pattern in this behavior, or give additional insight into how the reset types differ under the hood and how that might impact external tools, please let me know.

fenhl commented 1 year ago

I have now been able to reproduce on main Dev with the following steps: […]

I am now also only able to reproduce this with soft resets. What's going on here?