Skip to content

Fix crash importing a character with a minion main skill#2244

Draft
xh-forge wants to merge 5 commits into
PathOfBuildingCommunity:devfrom
xh-forge:fix-minion-crash-issue-2243
Draft

Fix crash importing a character with a minion main skill#2244
xh-forge wants to merge 5 commits into
PathOfBuildingCommunity:devfrom
xh-forge:fix-minion-crash-issue-2243

Conversation

@xh-forge

@xh-forge xh-forge commented Jun 19, 2026

Copy link
Copy Markdown

Problem

When importing a character that uses a minion main skill, PathOfBuilding-PoE2 can temporarily have a minion object before the selected/display minion skill state is fully rebuilt.

This caused two related crash paths:

  • RefreshSkillSelectControls iterated activeSkill.minion.activeSkillList while it was nil, causing ipairs(nil) at Build.lua:2044.
  • The Disciple of Varashta / Kelari case from Trying to import Skills from Disciple of Varashta Crashes and Bricks POB #2217 can get past the frame refresh but still have no displayed activeSkill.minion.mainSkill; hovering the socket group then crashed in SkillsTab.lua:1335.

Fixes #2243. Also covers the follow-up missing minion skill selection path reported from #2217.

Solution

  • Guard minion skill dropdown population in src/Modules/Build.lua until activeSkill.minion.activeSkillList exists and has at least one entry.
  • Guard the related activeSkillList iterations in src/Modules/Calcs.lua.
  • Guard socket group tooltip rendering in src/Classes/SkillsTab.lua until activeSkill.minion.mainSkill exists.

When minion skill data is not ready, the dependent dropdown/tooltip section is skipped instead of dereferencing a missing table/object.

Testing

  • Reproduced the Trying to import Skills from Disciple of Varashta Crashes and Bricks POB #2217 scenario using the poe.ninja profile export for KozzieCull:
    • fetched https://poe.ninja/poe2/profile/Kosmo2409-4451/runesofaldur/character/KozzieCull
    • decoded its pathOfBuildingExport
    • loaded the XML through HeadlessWrapper.lua
    • confirmed the pre-fix hover path crashed in Classes/SkillsTab.lua:1335 due to missing activeSkill.minion.mainSkill
    • confirmed the same hover probe no longer crashes after this change
  • busted --lua=luajit --pattern=TestSkills_spec.lua --filter=tooltip: 1 success / 0 failures / 0 errors
  • busted --lua=luajit --pattern=TestSkills_spec.lua: 50 successes / 0 failures / 0 errors
  • busted --lua=luajit: 424 successes / 0 failures / 0 errors
  • git diff --check: clean

Checklist

  • Code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective

@vaisest

vaisest commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

How did you test this without having access to the character import in that issue? From my previous testing with #2217, this doesn't fix it since the program will crash soon after due to the missing skill selection

- Add nil guards for activeSkill.minion.activeSkillList at two sites in
  Calcs.lua (lines 469, 578) that would crash with ipairs(nil) during
  the same frame cycle as the Build.lua fix
- Add end-to-end test using a real minion skill (Skeletal Sniper)
  through the full OnFrame pipeline to verify activeSkillList, mainSkill,
  and UI controls are properly populated
@xh-forge xh-forge marked this pull request as draft June 20, 2026 15:52
xh-forge added 2 commits June 20, 2026 15:31
…uildingCommunity#2243)

Reproduce the exact bug scenario: ImportItemsAndSkills with a minion
skill gem, then ImportPassiveTreeAndJewels to trigger a full rebuild,
then verify OnFrame completes without crashing and that the minion's
activeSkillList and mainSkill are properly populated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash importing a character with a minion main skill: ipairs(nil) in RefreshSkillSelectControls (Build.lua:2044)

2 participants