
addon is broken
Closed this issue · 3 comments
Addon Version
v11.0.2
World of Warcraft Version
Retail
Describe the bug
no bag slots appear and makes the bags unusable. i have been using adibags / better bags for ages and this hasnt happened to me before i assume it is related to the recent update.
Steps to reproduce
log into world of warcraft. open bags.
See the solution on the other thread : #762 (comment)
Fix: Prevent strsplit(nil) crash in ParseItemLink by adding full defensive validation
What this PR does:
This pull request resolves a critical Lua error in the BetterBags addon that occurs when strsplit receives nil instead of a valid item link string. Specifically, it prevents this crash in the items:ParseItemLink(link) function when malformed or missing item links are passed to the function during async item processing.
Root cause:
The function ParseItemLink assumed that link and rest are always valid strings. In some edge cases (missing items, async container updates, corrupted or zeroed-out items), the link is either nil or results in rest == nil, which causes strsplit() to throw an unrecoverable Lua error.
What has been changed:
ParseItemLink: Added a guard clause to verify that link is a non-empty string. If invalid, the function logs an error and returns a valid empty ItemLinkInfo object instead of proceeding.
Every strsplit(":", rest, 2) call is now protected with a type(rest) == "string" and rest ~= "" check before execution.
Console logging was added to print invalid link values for debug purposes. This makes it easier to trace malformed or null item link sources in-game.
The entire function is still fully compatible with the existing return structure and does not break downstream consumers of ItemLinkInfo.
Step-by-step Instructions:
-
Download the fixed file: https://github.com/davidmb1/BetterBags-Fix
-
Open your WoW AddOns folder:
-
Navigate to your World of Warcraft installation directory:
World of Warcraft/retail/Interface/AddOns/BetterBags/data/
If you’re on macOS:
/Applications/World` of Warcraft/retail/Interface/AddOns/BetterBags/data/
-
Backup your current file (optional but recommended):
Rename the current items.lua to something like items_backup.lua. -
Place the downloaded file:
Move the corrected items.lua into the /data/ folder, replacing the existing file. -
Restart WoW completely:
Exit the game if it’s running. Relaunch WoW to ensure the new logic is loaded correctly.
Duplicate of #762 .