Skip to content

Fix crash when importing/selecting a character with imbued support gems - #10467

Open
AdamZ-8113 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:fix/imbued-support-import
Open

AdamZ-8113 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:fix/imbued-support-import

Conversation

@AdamZ-8113

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

When importing a character that has an Imbued Support gem, import is successful but selecting that skill/skill group in the skills tab causes a crash.

Error:

In 'OnFrame': Classes/SkillsTab.lua:1290: attempt to index local 'gemId' (a nil value)
stack traceback:
	Classes/SkillsTab.lua:1290: in function 'SetDisplayGroup'
	Classes/SkillListControl.lua:152: in function 'OnSelect'
	Classes/ListControl.lua:105: in function 'SelectIndex'
	Classes/ListControl.lua:374: in function 'OnKeyDown'
	Classes/ControlHost.lua:68: in function 'ProcessControlsInput'
	Classes/SkillsTab.lua:660: in function 'Draw'
	Modules/Build.lua:1311: in function 'CallMode'
	Modules/Main.lua:409: in function <Modules/Main.lua:379>
	[C]: in function 'PCall'
	Launch.lua:112: in function <Launch.lua:109>
v2.67.2-a69391d6d beta
Press Enter/Escape to dismiss, F4 to return to build selection, or F5 to restart the application.
Press CTRL + C to copy error text.

As far as I can tell, this is happening because GGG changed builtInSupport from plain text to using their common keyword markup, like [SupportVolatility|Volatility]. This feature was previously implemented expecting plain text, because that's what we saw in the response, like "builtInSupport": "Supported by Level 1 Volatility"

This uses the existing escapeGGGString function to remove the markup, following the same pattern PoB uses when parsing item text. It also prevents an unrecognised support from crashing the Skills tab.

Steps taken to verify a working solution:

  • Tested importing my character through both OAuth and regular character imports with this fix applied
  • Used Codex to find some old character import response confirming that builtInSupport was previously plain text, matching the implementation
  • Ran the test suite

Link to a build that showcases this PR:

  • https://pob.codes/b/tSP7_lR8U1K (imbued support doesn't show here, need to update the site, but importing this build with the PR applied will show the gem)

Before screenshot:

N/A

After screenshot:

image

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.

1 participant