BetterBags

BetterBags

2M Downloads

LUA errors on login in patch 11.1.5

Closed this issue ยท 21 comments

commented

Addon Version

v0.3.18

World of Warcraft Version

Retail

Describe the bug

When I logged in after patch 11.1.5, I got the too many errors message. Disabling BetterBags makes the errors go away. BugSack shows the following:

32x BetterBags/data/items.lua:929: bad argument #2 to 'strsplit' (string expected, got nil)
[C]: in function 'strsplit'
[BetterBags/data/items.lua]:929: in function 'ParseItemLink'
[BetterBags/data/items.lua]:1260: in function 'AttachItemInfo'
[BetterBags/data/loader.lua]:101: in function <BetterBags/data/loader.lua:96>
[C]: in function 'xpcall'
[Blizzard_ObjectAPI/Mainline/AsyncCallbackSystem.lua]:76: in function 'FireCallbacks'
[Blizzard_ObjectAPI/Mainline/AsyncCallbackSystem.lua]:35: in function <.../Blizzard_ObjectAPI/Mainline/AsyncCallbackSystem.lua:31>
[C]: in function 'resume'
[BetterBags/core/async.lua]:47: in function <BetterBags/core/async.lua:46>

Locals:
(*temporary) = ":"
(*temporary) = nil
(*temporary) = 2
(*temporary) = "string expected, got nil"

Steps to reproduce

  1. Log into WoW with BetterBags enabled.
commented

I have the same error messages, here are is my Bugsack

3x BetterBags/data/items.lua:950: bad argument #2 to 'strsplit' (string expected, got nil)
[C]: in function 'strsplit'
[BetterBags/data/items.lua]:950: in function 'ParseItemLink'
[BetterBags/data/items.lua]:1260: in function 'AttachItemInfo'
[BetterBags/data/loader.lua]:101: in function <BetterBags/data/loader.lua:96>
[C]: in function 'xpcall'
[Blizzard_ObjectAPI/Mainline/AsyncCallbackSystem.lua]:76: in function 'FireCallbacks'
[Blizzard_ObjectAPI/Mainline/AsyncCallbackSystem.lua]:35: in function <.../Blizzard_ObjectAPI/Mainline/AsyncCallbackSystem.lua:31>
[C]: in function 'resume'
[BetterBags/core/async.lua]:47: in function <BetterBags/core/async.lua:46>

Locals:
(*temporary) = ":"
(*temporary) = nil
(*temporary) = 2
(*temporary) = "string expected, got nil"
23x BetterBags/data/items.lua:929: bad argument #2 to 'strsplit' (string expected, got nil)
[C]: in function 'strsplit'
[BetterBags/data/items.lua]:929: in function 'ParseItemLink'
[BetterBags/data/items.lua]:1260: in function 'AttachItemInfo'
[BetterBags/data/loader.lua]:101: in function <BetterBags/data/loader.lua:96>
[C]: in function 'xpcall'
[Blizzard_ObjectAPI/Mainline/AsyncCallbackSystem.lua]:76: in function 'FireCallbacks'
[Blizzard_ObjectAPI/Mainline/AsyncCallbackSystem.lua]:35: in function <.../Blizzard_ObjectAPI/Mainline/AsyncCallbackSystem.lua:31>

Locals:
(*temporary) = ":"
(*temporary) = nil
(*temporary) = 2
(*temporary) = "string expected, got nil"

This is the screenshot of my bags

Image

Steps to reproduce
Log into WoW with BetterBags enabled.

commented

In BetterBags/data/items.lua:903, change:

local _, itemID, enchantID, gemID1, gemID2, gemID3, gemID4,
	suffixID, uniqueID, linkLevel, specializationID, modifiersMask,
	itemContext, rest = strsplit(":", link, 14) --[[@as string]]

to

local _, _, itemID, enchantID, gemID1, gemID2, gemID3, gemID4,
	suffixID, uniqueID, linkLevel, specializationID, modifiersMask,
	itemContext, rest = strsplit(":", link, 15) --[[@as string]]

Seems they added something new to the front. Here is an example link:

|cnIQ4:|Hitem:178870::::::::80:267::16:8:11987:10390:6652:10395:10878:10383:9964:10255:1:28:2462:::::|h[Ritual Bone Band]|h|r

not sure what |cnIQ4 is.

commented

@kdar I tried your change above and it worked! Thank you!

commented

tried the change, fixed my bags

commented

this fixed it for me as well

commented

Awesome Kdar! Thanks, this worked for me as well!

commented

Fixed for me as well

commented

@kdar is bis! Thanks for the solution!

commented

@kdar fixed it for me, thanks so much!

commented

That fix worked for me as well. Legit Patch bro.

commented

@kdar That drops all the extra info. Changing the strsplit limit from 14 to 15 is required to not lose information.

commented

@kdar - It's an update to the API

For cases where item quality colors are displayed in strings, new markup support has been added in the form of |cnIQn:text|r where n corresponds to a numeric [Enum.ItemQuality] value.

commented

@kdar - It's an update to the API

For cases where item quality colors are displayed in strings, new markup support has been added in the form of |cnIQn:text|r where n corresponds to a numeric [Enum.ItemQuality] value.

Is there a better fix than the one suggested atm then?

commented

Image

commented

Ah I see, thanks for checking that out! The new replacement line is

local _, _, itemID, enchantID, gemID1, gemID2, gemID3, gemID4,
	suffixID, uniqueID, linkLevel, specializationID, modifiersMask,
	itemContext, rest = strsplit(":", link, 15) --[[@as string]]

I edited my comment above in case people run into it.

commented

Thank you!!

commented

Thx for the fix :)

commented

LGTM

commented

Definitive solution:

#764 (comment)

commented
|cnIQ4:|Hitem:178870::::::::80:267::16:8:11987:10390:6652:10395:10878:10383:9964:10255:1:28:2462:::::|h[Ritual Bone Band]|h|r

not sure what |cnIQ4 is.

ItemLink was modified due to the new custom color system Blizzard introduced in 11.1.5. IQ stands for Item Quality, |cnIQ4 is the modifier for Epic quality color. You can see the diff here : https://www.townlong-yak.com/framexml/live/Helix/GlobalStrings.lua/diff

Was

PLAYER_CHOICE_QUALITY_STRING_COMMON = "|cffffffffCommon|r|n|n";
PLAYER_CHOICE_QUALITY_STRING_UNCOMMON = "|cff1eff00Uncommon|r|n|n";
PLAYER_CHOICE_QUALITY_STRING_RARE = "|cff0070ddRare|r|n|n";
PLAYER_CHOICE_QUALITY_STRING_EPIC = "|cffa335eeEpic|r|n|n";

Now is

PLAYER_CHOICE_QUALITY_STRING_COMMON = "|cnIQ1:Common|r|n|n";`
PLAYER_CHOICE_QUALITY_STRING_UNCOMMON = "|cnIQ2:Uncommon|r|n|n";
PLAYER_CHOICE_QUALITY_STRING_RARE = "|cnIQ3:Rare|r|n|n";
PLAYER_CHOICE_QUALITY_STRING_EPIC = "|cnIQ4:Epic|r|n|n";

They also added a new ColorManager class : https://www.townlong-yak.com/framexml/live/Blizzard_Colors/ColorManager.lua.
Interestingly, ItemQuality level 5 (legendary), 6 (artifact), 7 (Heirloom) don't seem to be referenced, even though they can be customized.
Interestingly also, ItemQuality level 8 (WoW Token)'s color cannot be changed, probably for security reasons.

commented

Thank you Kdar! Your fix worked perfect!