doshidak / showdex

Pokémon Showdown extension that harnesses the power of parabolic calculus to strategically extract your opponents' Elo.
GNU Affero General Public License v3.0
97 stars 18 forks source link

BUG: Calcdex lost track of battle against same player in two separate matches #192

Closed jmynes closed 1 month ago

jmynes commented 6 months ago

Once the opponent's Suicune came into play, it did not show up on the sidebar, and my Aerodactyl stopped tracking health/berry status: image

A refresh did not fix the issue, it made it worse: image

Queueing up a new match did fix it, in new matches

Device: Desktop computer OS & Version: Windows 10, fully up to date Browser: Microsoft Edge (chromium) Showdex Version: v1.2.3 Format, if applicable: ADV OU Unfortunately, I forgot to to grab the replay

jmynes commented 6 months ago

I managed to have another matchup with the same player, and it broke my Calcdex tracking again, after only a few turns: https://replay.pokemonshowdown.com/gen3ou-2060356715-7qkz66xfmzkztx8xhvj4i0vxymmt2dypw image

jmynes commented 6 months ago

First time it's happened to me with a different player

This is my 15th open tab, the previous 14 fights are completed https://replay.pokemonshowdown.com/gen3ou-2066916249 image

doshidak commented 1 month ago

LMAO so it turns out that I forgot to sanitize one of the inputs (oopsies), so these Pokémon nicknames ending with "???" (like the "Dog???" Suicune LOL) & such were forming invalid RegExp's, resulting in the following silent initialization crash outside of the UI:

Invalid regular expression: /(p2)[a-z]?:\s*(Dog???[\w\s-]*)/i: Nothing to repeat

Funny thing too is that this RegExp is to parse Showdown's battle log, which includes nicknames, so technically doesn't matter whether you have Pokémon Nicknames disabled in the Show / Hide settings, e.g.,

|switch|p2a: Dog???|Suicune|100/100|[from] Baton Pass

Anyway, thanks for letting the dogs out, as well as providing the super detailed report!!

calcdex-bork-bork