Skip to content

Fix crash when a minion with Energy Shield is an ally Life pool - #10643

Open
zubSero wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
zubSero:fix-ally-minion-es
Open

zubSero wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
zubSero:fix-ally-minion-es

Conversation

@zubSero

@zubSero zubSero commented Nov 30, 2026

Copy link
Copy Markdown

Fixes #10642.

Description of the problem being solved:

Since 2.69.0, PoB crashes with CalcPerform.lua:1205: attempt to index field 'minion' (a nil value) when a minion with Energy Shield is used as an ally Life pool and the main skill has no minion. In the issue that's a Chaos Golem supported by Companionship next to Herald of Agony, with Poisonous Concoction as the main skill. Hovering a gem's enabled checkbox or removing a gem runs that calculation, and so does loading the saved build.

initMinionModDB also runs for minions used as an ally Life pool, but #9816 changed its Energy Shield lines to read env.minion (the main skill's minion) instead of the local minion. Without a main skill minion that crashes. With one, the pool minion got its Energy Shield from the wrong minion's level and life table. A Chaos Golem next to a level 1 Raise Zombie main skill ended up with 20 Energy Shield instead of 2039.

The lines now use the minion being initialised and its own skill. For the main skill minion nothing changes, since it is the same minion there.

Steps taken to verify a working solution:

  • Added a test with a Companionship-supported Chaos Golem that checks its Energy Shield with the golem, Fireball and a level 1 Raise Zombie as the main skill. On dev it crashes on Fireball and gets 20 instead of 2039 on the Zombie.
  • Loaded the build from the issue and toggled Herald of Agony. It crashes on dev and calculates normally with this change.
  • Ran the full test suite.

Link to a build that showcases this PR:

https://pobb.in/TTIp6NA6Vt5U

initMinionModDB read the main skill's minion (env.minion) when computing
base Energy Shield. Since it is also called for minions used as an ally
Life pool, this crashed when the main skill had no minion, and used the
wrong level otherwise. Fixes PathOfBuildingCommunity#10642.
@zubSero zubSero mentioned this pull request Nov 30, 2026
2 tasks done
@AdamZ-8113

Copy link
Copy Markdown
Contributor

This is a duplicate of #10571

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.

Disabling Herald of Agony crashes PoB

2 participants