audinowho / PMDODump

All content generation for PMDO. BEWARE SPOILERS.
MIT License
61 stars 13 forks source link

Error when choosing Replays when files are deleted After entering parent menu #197

Open issuebotaudinowho[bot] opened 1 year ago

issuebotaudinowho[bot] commented 1 year ago

Discord: Shitpost Sunkern#8311 <@292039958829727744>

The following error occurs when selecting "Replays" from the Records menu when the REPLAY folder only contains other folders:

[2022/12/04 15:14:27.441] Index was outside the bounds of the array.
Exception Depth: 0
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at RogueEssence.Menu.MultiPageMenu.SetPage(Int32 page)
   at RogueEssence.Menu.MultiPageMenu.Initialize(Loc start, Int32 width, String title, IChoosable[][] totalChoices, Int32 defaultChoice, Int32 defaultPage, Int32 spacesPerPage, Boolean showPagesOnSingle, IntRange multiSelect)
   at RogueEssence.Menu.ReplaysMenu..ctor()
   at RogueEssence.Menu.RecordsMenu.<>c.<.ctor>b__0_0()
   at RogueEssence.Menu.MenuManager.ProcessMenus(InputManager input)

Lua Trace:
stack traceback:

Coroutine Trace:
RogueEssence.Menu.MenuManager+<processInternalCoroutine>d__46
RogueEssence.Menu.MenuManager+<ProcessMenuCoroutine>d__17
RogueEssence.Menu.MenuManager+<ProcessMenuCoroutine>d__16
RogueEssence.TitleScene+<ProcessInput>d__8
RogueEssence.GameManager+<ScreenMainCoroutine>d__71
audinowho commented 1 year ago

Relevant file: https://github.com/RogueCollab/RogueEssence/blob/8addd5a0f203216249b281ea324118c14d24c708/RogueEssence/Menu/Records/RecordsMenu.cs

purpasmart96 commented 1 year ago

Verified, however, please note that this only occurs when the user manually deletes files externally while the game is already in the replays menu.