Skip to content

Guard Trader result dropdown tooltip against stale state - #9742

Merged
LocalIdentity merged 3 commits into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/trade-query-tooltip-nil
Apr 16, 2026
Merged

Guard Trader result dropdown tooltip against stale state#9742
LocalIdentity merged 3 commits into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/trade-query-tooltip-nil

Conversation

@mcagnion

@mcagnionmcagnion commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

The Trader result dropdown tooltip can be evaluated after the sorted row state or backing result entry has changed, which can leave the callback pointing at missing entries and trigger nil accesses.

Description of the solution:

Add early-return guards in the resultDropdown tooltip callback when:

  • the sorted row is missing
  • the requested dropdown entry is missing
  • the backing result entry is no longer available

This keeps the nominal path unchanged and only hardens the callback against transient state desynchronization.

Steps taken to verify a working solution:

  • Added targeted tests in TestTradeQuery_spec.lua covering:
    • a missing sortedResultTbl[row_idx] row
    • a missing backing result entry for the selected dropdown item
  • Ran both targeted tooltip guard tests successfully.

Notes:

@mcagnion
mcagnionforce-pushed the bugfix/trade-query-tooltip-nil branch 4 times, most recently from 8344d05 to 48859b1CompareApril 9, 2026 17:59
@Nightblade

Copy link
Copy Markdown
Contributor

Hi, please remember to use TAB indentation. ( spec/System/TestTradeQuery_spec.lua is spaced. )

mcagnionand others added 3 commits April 15, 2026 20:46
The nil guard lost during the vaisest/trader-improvements merge
caused a crash when hovering the result dropdown after clearing
search results.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mcagnion
mcagnionforce-pushed the bugfix/trade-query-tooltip-nil branch from 159a4e3 to cd6a682CompareApril 15, 2026 18:49
@LocalIdentityLocalIdentity added the user-interface Changes that only affect the UI label Apr 16, 2026
@LocalIdentity
LocalIdentity merged commit ec71ed6 into PathOfBuildingCommunity:devApr 16, 2026
3 checks passed
@mcagnion
mcagnion deleted the bugfix/trade-query-tooltip-nil branch May 14, 2026 12:24
mauriceco2424 added a commit to mauriceco2424/PathOfBuilding that referenced this pull request Jun 16, 2026
Key changes:
- Imbued Supports system (PathOfBuildingCommunity#9670) — replaces alternate quality code (PathOfBuildingCommunity#9758),
with follow-up fixes for gem list visibility (PathOfBuildingCommunity#9782, PathOfBuildingCommunity#9796), trigger
supports (PathOfBuildingCommunity#9793), and indexing bugs (PathOfBuildingCommunity#9763). This is the in-league
replacement for Awakened gems and changes how transfigured supports
scale.
- Calc fixes wave: skills that can repeat (PathOfBuildingCommunity#9723), Vaal Flameblast base
AoE (PathOfBuildingCommunity#9704), Generals Cry clones restricted by attack time, Maven
Memory Game damage (PathOfBuildingCommunity#9757), Hextoad breakdown (PathOfBuildingCommunity#9683), CwC crash with
multiple link groups (PathOfBuildingCommunity#9682), Searing Bond of Detonation power charges
(PathOfBuildingCommunity#9695), Tinctures applying without Mana (PathOfBuildingCommunity#9769), Ghost Reaver leech
with Life Leech sources (PathOfBuildingCommunity#9774), Poisonous Concoction added damage
from disabled life flasks (PathOfBuildingCommunity#9339), Blade Blast of Dagger Detonation
Varunastra counting (PathOfBuildingCommunity#9733), converted damage with poison stacks
(PathOfBuildingCommunity#8991), Chieftain resist nodes Foulborn Choir double-apply (PathOfBuildingCommunity#9643),
Turbulent catalyst flat lightning scaling (PathOfBuildingCommunity#9775), some buffs applying
to player and minions wrongly (PathOfBuildingCommunity#9789), negative eHP and NaN Max hit
(PathOfBuildingCommunity#9772), Dual Wield mastery thrusting+non-thrusting (PathOfBuildingCommunity#9761).
- Ring slot 3 fixes (PathOfBuildingCommunity#9686, PathOfBuildingCommunity#9730) — mods applying when Unseen Hand
isn't allocated.
- Build comparison tab (PathOfBuildingCommunity#9543) — pure UI, headless mode unaffected.
- New spectres: Conjuror of Rot (PathOfBuildingCommunity#9702), Unholy Aberration (PathOfBuildingCommunity#9731).
- Trader improvements (PathOfBuildingCommunity#9691), Watcher's eye trade search (PathOfBuildingCommunity#9649),
duplicate-search fix (PathOfBuildingCommunity#9767), stale state guard (PathOfBuildingCommunity#9742).
- Lesson of Seasons spell barkskin mod (PathOfBuildingCommunity#9820).
- Lingering Blades extends to Animate Weapon of Ranged Arms.
- Runtime DLLs bumped to SimpleGraphic v2.5.3 (PathOfBuildingCommunity#9395) — affects desktop
PoB UI only; headless API runtime is the bundled LuaJIT.
- Releases 2.64.0 and 2.65.0.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

user-interfaceChanges that only affect the UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@mcagnion@Nightblade@LocalIdentity