Jump to content

[Bug] Encounter Database search button permanently disables when searching Arceus with Version "Any" (BDSP)


Recommended Posts

Posted

Hello,

When loading a BDSP save file and accessing the Encounter Database, searching for Arceus (493) with the Version filter set to [b]"Any"[/b] causes the Search button to gray out indefinitely. It doesn't even show the standard [i]"No results found!"[/i] message.

However, if the Version filter is explicitly set to [b]"BD/SP"[/b] or corresponding BDSP versions (instead of "Any"), Arceus successfully appears in the search results without any issues.

[b][color=#42A5F5][Technical Details & Root Cause][/color][/b]
After looking into the source code ([i]master[/i] branch), I noticed the reason why the UI freezes instead of throwing an error:

[list=1]
[*]In [font=courier][color=#EF5350]SAV_Encounters.cs[/color][/font], the [font=courier][color=#EF5350]B_Search_Click[/color][/font] method has an empty [b]catch[/b] block that silences exceptions, but it lacks a [b]finally[/b] block to restore the UI state.
[*]When the Version is set to [font=courier]Any[/font], [font=courier][color=#EF5350]settings.GetVersions(SAV)[/color][/font] likely expands in a way that causes an exception downstream in [font=courier][color=#EF5350]GetAllSpeciesFormEncounters[/color][/font] or [font=courier][color=#EF5350]GetEncounters[/color][/font] (perhaps an unhandled Gen8b template context).
[*]Because the exception is swallowed by the empty [font=courier]catch { }[/font] block, the code never reaches [font=courier][color=#EF5350]B_Search.Enabled = true;[/color][/font]. As a result, the Search button remains permanently disabled.
[/list]

Adding a [b]finally[/b] block there would easily fix the UI freeze, but could you also look into the actual exception happening during the "Any" search for BDSP saves?

Thanks!
 

Posted

Thank you so much for taking care of this!

I've been a huge admirer of yours for a while, and I recently started dabbling in game analysis myself. Every day I'm reminded of just how incredible you are.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...