AznamirWoW / PallyPower

The official repository of PallyPower for retail version of World of Warcraft Classic/TBC
Other
6 stars 7 forks source link

Random lua error upon pressing release spirit in an instance environment (5 man dungeon) #21

Closed Pocokk closed 7 months ago

Pocokk commented 11 months ago

8x PallyPower/PallyPower.lua:1518: Usage: ChatThrottleLib:SendAddonMessage("{BULK| ORMAL||ALERT}", "prefix", "text", "chattype"[, "target"]) string "=[C]": in function error' [string "@AtlasLootClassic/Libs/AceComm-3.0-12/ChatThrottleLib.lua"]:462: in functionSendAddonMessage' [string "@PallyPower/PallyPower.lua"]:1518: in function SendMessage' [string "@PallyPower/PallyPower.lua"]:1411: in functionSendSelf' [string "@PallyPower/PallyPower.lua"]:1533: in function <PallyPower/PallyPower.lua:1525>

[string "@PallyPower/Libs/AceBucket-3.0-4/AceBucket-3.0.lua"]:69: in function <...dOns/PallyPower/Libs/AceBucket-3.0/AceBucket-3.0.lua:67> [string "@PallyPower/Libs/AceBucket-3.0-4/AceBucket-3.0.lua"]:83: in function `func' [string "@Details/Libs/AceTimer-3.0-17/AceTimer-3.0.lua"]:57: in function <...ceDetails/Libs/AceTimer-3.0/AceTimer-3.0.lua:50>

Locals: (*temporary) = "Usage: ChatThrottleLib:SendAddonMessage("{BULK| ORMAL||ALERT}", "prefix", "text", "chattype"[, "target"])"

AznamirWoW commented 11 months ago

Looks like an issue caused by a different addon with an outdated/incompatible library ( Atlas Loot Classic /Libs/AceComm-3.0-12/ChatThrottleLib.lua). Or maybe not, try to reproduce it with Atlas Loot disabled or update it to latest version.

raethkcj commented 11 months ago

Libraries like Ace use LibStub to automatically force a single, most up-to-date version to be loaded, even if one addon has an out of date version. So there's nothing wrong with AtlasLoot's version of AceComm; if it was out of date, LibStub would automatically load a newer one from PallyPower. Since they're the same version, it just loads the version from the first addon to include it, alphabetically.

The error seems to be that type is sometimes left nil, likely when a player is in an Instance group but not in an Instance: https://github.com/AznamirWoW/PallyPower/blob/ff243d2b1afb5680136792f029dde4f1c0422003/PallyPower.lua#L1503-L1513

Pocokk commented 11 months ago

likely when a player is in an Instance group but not in an Instance:

Yep, that happened, I released and then the lua error popped-up.

AznamirWoW commented 11 months ago

so replacing

elseif IsInGroup(LE_PARTY_CATEGORY_HOME) then

with just "else" should fix it?