Brian0255 / NDS-Ironmon-Tracker

An ironMON tracker for Nintendo DS Pokémon games.
GNU General Public License v3.0
39 stars 16 forks source link

Certain favorites will permanently crash Tracker on startup #103

Closed UTDZac closed 11 months ago

UTDZac commented 1 year ago

There is a bug that crashes the Tracker on start-up if something weird happens to the saved favorites file. I'm not sure how this occurs or how to reproduce it, I just know its been reported at least 3-4 times in the ironmon discord over the past few months.

NDS-Ironmon-Tracker v5.7.2 NDS ROM detected. Loading... Pokemon Black 2 detected. NLua.Exceptions.LuaScriptException: ironmon_tracker/ui/TitleScreen.lua:231: attempt to index a nil value (field '?')

Here is the contents of a sample Pokemon_Black_2.faves file, and the contents of that file are: 254,230,474,774,145. I believe 774 is Rotom-Fan (not confident)?

If you'd like help digging into this issue and resolving it, I can take a look. I figured I'd mention it first if you knew of an easy fix, you're probably faster at it than I am.

If anything, a simple check to confirm the index is within range before referencing data about that pokemon's name is the first place I'd start.