Skip to content

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

Draft
xh-forge wants to merge 3 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 3 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 attempts to populate a list of available minion skills in the dropdown interface. However, some minion instances don't have their activeSkillList initialized immediately upon import. This resulted in an unrecoverable ipairs(nil) exception at Build.lua:2044, crashing the application.

Fixes #2243

Solution

I have added a defensive if check around the iteration block in src/Modules/Build.lua. The code now verifies that activeSkill.minion.activeSkillList exists and contains at least one element (activeSkill.minion.activeSkillList[1]) before attempting to loop over the skills and populate the UI components.

If the condition is not met, the dropdown simply stays unpopulated, effectively circumventing the crash without breaking the regular minion skill flow.

Testing

  • Local Testing: Please test this by importing the character from the issue report locally.
  • Automated Tests: I have run the entire busted test suite natively, and it passed with 48 successes / 0 failures. The tests now include dedicated checks for missing/empty activeSkillList parameters.
  • Syntax Check: Code was visually verified to contain standard and correct Lua syntax.

Checklist

  • Code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (N/A)
  • I have added tests that prove my fix is effective or that my feature works

@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
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