Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Generation with ALTTP and KH AssertionError: entrance with no connected region #4527

Open
Mysteryem opened this issue Jan 21, 2025 · 0 comments · May be fixed by #4530
Open

Bug: Generation with ALTTP and KH AssertionError: entrance with no connected region #4527

Mysteryem opened this issue Jan 21, 2025 · 0 comments · May be fixed by #4530
Labels
affects: release/blocker Issues/PRs that must be addressed before next official release. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.

Comments

@Mysteryem
Copy link
Contributor

Mysteryem commented Jan 21, 2025

What happened?

Template A Link to the Past and Kingdom Hearts yamls cannot generate together. By bisecting the commits, the cause is: 436c0a4 / #4420 @NewSoupVi

Creating MultiWorld.
Creating Items.
Calculating Access Rules.
Traceback (most recent call last):
  File "G:\git_Repos_other\Archipelago\Generate.py", line 552, in <module>
    multiworld = ERmain(erargs, seed)
                 ^^^^^^^^^^^^^^^^^^^^
  File "G:\git_Repos_other\Archipelago\Main.py", line 126, in main
    AutoWorld.call_all(multiworld, "set_rules")
  File "G:\git_Repos_other\Archipelago\worlds\AutoWorld.py", line 184, in call_all
    call_single(multiworld, method_name, player, *args)
  File "G:\git_Repos_other\Archipelago\worlds\AutoWorld.py", line 174, in call_single
    raise e
  File "G:\git_Repos_other\Archipelago\worlds\AutoWorld.py", line 167, in call_single
    ret = _timed_call(method, *args, multiworld=multiworld, player=player)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\git_Repos_other\Archipelago\worlds\AutoWorld.py", line 153, in _timed_call
    ret = method(*args)
          ^^^^^^^^^^^^^
  File "G:\git_Repos_other\Archipelago\worlds\alttp\Rules.py", line 113, in set_rules
    set_trock_key_rules(world, player)
  File "G:\git_Repos_other\Archipelago\worlds\alttp\Rules.py", line 1128, in set_trock_key_rules
    all_state = world.get_all_state(use_cache=False)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\git_Repos_other\Archipelago\BaseClasses.py", line 443, in get_all_state
    ret.sweep_for_advancements()
  File "G:\git_Repos_other\Archipelago\BaseClasses.py", line 861, in sweep_for_advancements
    reachable_advancements = {location for location in locations if location.can_reach(self)}
                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\git_Repos_other\Archipelago\BaseClasses.py", line 1272, in can_reach
    return self.parent_region.can_reach(state) and self.access_rule(state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\git_Repos_other\Archipelago\BaseClasses.py", line 1148, in can_reach
    state.update_reachable_regions(self.player)
  File "G:\git_Repos_other\Archipelago\BaseClasses.py", line 755, in update_reachable_regions
    self._update_reachable_regions_explicit_indirect_conditions(player, queue)
  File "G:\git_Repos_other\Archipelago\BaseClasses.py", line 771, in _update_reachable_regions_explicit_indirect_conditions
    assert new_region, f"tried to search through an Entrance \"{connection}\" with no connected Region"
AssertionError: tried to search through an Entrance "Awakening (Player2)" with no connected Region
Exception in <bound method set_rules of <worlds.alttp.ALTTPWorld object at 0x000002BF54AF1A30>> for player 1, named Player1.

With assertions disabled, this errors a few lines later with:

  File "G:\git_Repos_other\Archipelago\BaseClasses.py", line 774, in _update_reachable_regions_explicit_indirect_conditions
    blocked_connections.update(new_region.exits)
                               ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'exits'
Exception in <bound method set_rules of <worlds.alttp.ALTTPWorld object at 0x000001BD319FD280>> for player 1, named Player1.

What were the expected results?

Generation succeeds

Software

Local generation

@Exempt-Medic Exempt-Medic added is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. affects: release/blocker Issues/PRs that must be addressed before next official release. labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: release/blocker Issues/PRs that must be addressed before next official release. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.
Projects
None yet
2 participants