Skip to content

Fix crash when importing some builds to party tab#1872

Merged
LocalIdentity merged 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/party-member-stats-decimal-export
May 19, 2026
Merged

Fix crash when importing some builds to party tab#1872
LocalIdentity merged 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/party-member-stats-decimal-export

Conversation

@unrealdreamz
Copy link
Copy Markdown
Contributor

@unrealdreamz unrealdreamz commented May 18, 2026

Summary

  • Fix party member stat exports that contain decimal metadata values such as MovementSpeedMod|percent|max=129.6.
  • Add regression coverage for decimal stat metadata and multi-key nested stat exports.

Root Cause

  • PartyTab.ParseBuffs treated any stat export line containing . as a nested key.subkey=value line.
  • Decimal values also contain ., so max=129.6 was sent through the nested-stat path.
  • That path then attempted to index a nil nested label table and crashed during party import.

Fix

  • Replace the broad dot check with an anchored nested-stat matcher: key.subkey=value.
  • Only use the nested path when the whole line matches that shape.
  • Ensure the nested table exists before assigning subkeys.
  • Decimal metadata now stays on the normal stat-value parsing path.

Validation

  • PASS: git diff --check
    • Output only included line-ending warnings from the Windows checkout.
  • PASS: focused Lua reproduction of the root cause/fix:
    • old broad dot path crashes on MovementSpeedMod|percent|max=129.6
    • anchored nested-stat path parses decimal metadata and preserves nested stats
  • PASS: targeted Busted spec after installing the repo's LuaJIT/Busted dependencies locally:
    • Command: busted --lua=luajit ../spec/System/TestPartyTab_spec.lua
    • Output: 2 successes / 0 failures / 0 errors / 0 pending : 4.297 seconds
  • Not run locally: docker-compose up
    • Docker/docker-compose are not available in this local environment.

Risk / Rollback

  • Low risk: this narrows an overly broad parser branch to the nested-stat syntax it was meant to handle.
  • Valid nested exports remain covered by the regression test.
  • Rollback is the single parser change plus the test file.

Fixes #1689

@unrealdreamz unrealdreamz marked this pull request as ready for review May 18, 2026 18:38
@LocalIdentity LocalIdentity added pob1 Should also be merged into PoB1 Repo crash Causes PoB to crash and is High Priority labels May 19, 2026
@LocalIdentity LocalIdentity changed the title Fix party member stat decimal parsing Fix crash when importing some builds to party tab May 19, 2026
@LocalIdentity LocalIdentity merged commit 1618c66 into PathOfBuildingCommunity:dev May 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crash Causes PoB to crash and is High Priority pob1 Should also be merged into PoB1 Repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Party import fails with "table index is nil"

2 participants