RankSentinel

RankSentinel

151k Downloads

Pets group units cause errors

Road-block opened this issue ยท 17 comments

commented
6x RankSentinel\Utilities.lua:102: attempt to index field 'petOwnerCache' (a nil value)
[string "@RankSentinel\Utilities.lua"]:102: in function <RankSentinel\Utilities.lua:97>
[string "=(tail call)"]: ?
[string "@RankSentinel\RankSentinel-264371b.lua"]:114: in function `?'
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function `Fire'
[string "@Ace3\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
commented

I lied, happens inside instances too, I am in one right now sorry for the barebones report (latest alpha)

commented

Ah, thanks. Looking into it.

I didn't test out pets after major overhaul and flavor additions last night.

commented

Huh, looks like it was never part of the database initialization, I just had enough logic surrounding petOwnerCache to add it later on with UpgradeProfile and ClearCache.

Should be fixed with 9d3ab6d

commented
12x SendChatMessage(): Invalid escape code in chat message
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "@RankSentinel\Cache.lua"]:40: in function `ProcessQueuedNotifications'
[string "@RankSentinel\Cache.lua"]:60: in function `QueueNotification'
[string "@RankSentinel\RankSentinel-264371b.lua"]:145: in function `?'

as well with the same alpha (haven't updated yet)

commented

That error shows up when the |TInterface\\TargetingFrame\\UI-RaidTargetingIcon_7.blp:0|t string (from Self) shows up in a Whisper notification, hopefully it's handled by fixed petOwnerCache lookup so the proper contactName is evaluated.

commented

Latest alpha didn't fix the SendAddonMessage error.

62x SendChatMessage(): Invalid escape code in chat message
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "@RankSentinel\Cache.lua"]:40: in function `ProcessQueuedNotifications'
[string "@RankSentinel\Cache.lua"]:60: in function `QueueNotification'
[string "@RankSentinel\RankSentinel-264371b.lua"]:145: in function `?'
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function `Fire'
[string "@Ace3\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
commented

Hmm, actually not sure, I'm raiding atm and I might not have reloaded :/

commented

Looks like it is the same version both times, RankSentinel-264371b.lua

Will wait and see if reload works/ed. I also raid tonight so should get testing time in as well.

commented

I definitely have the latest alpha, I manually downloaded from curseforge and overwrote.

84x SendChatMessage(): Invalid escape code in chat message
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "@RankSentinel\Cache.lua"]:40: in function `ProcessQueuedNotifications'
[string "@RankSentinel\Cache.lua"]:60: in function `QueueNotification'
[string "@RankSentinel\RankSentinel-264371b.lua"]:145: in function `?'
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function `Fire'
[string "@Ace3\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>

Edit: Might be a packager issue, I downloaded from here and overwrote and it seems to have cleared it up.

Edit2: It's definitely happening with 46daf22

127x SendChatMessage(): Invalid escape code in chat message
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "@RankSentinel\Cache.lua"]:40: in function `ProcessQueuedNotifications'
[string "@RankSentinel\Cache.lua"]:60: in function `QueueNotification'
[string "@RankSentinel\RankSentinel-264371b.lua"]:145: in function `?'
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function `Fire'
[string "@Ace3\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>

I know the callstack has the same number but I 100% installed from the master ๐Ÿ˜Š

commented

I'm not able to repro myself, unless I'm not lead.

I tweaked a few things, but still trying to work out non-lead notification output.

commented

I'll try to debug it myself when I get a chance.
Essentially I'm going to cache the text it's trying to send, pcall the function and dump the cached string if SendChatMessage errors to see what causes the problem ..

commented

I do have another question.
Where's the check done that whisper option is enabled?
I see Cache.lua#L27 sending to whisper unconditionally.
Should that be the case?

commented

RankSentinel/Cache.lua

Lines 35 to 43 in 46daf22

if notification.target == self.playerName then
self:PrintMessage(notification.message)
elseif self.playerName ~= self.cluster.lead then
self:PrintMessage(fmt("%s - %s", notification.target,
notification.ability))
else
SendChatMessage(notification.message, "WHISPER", nil,
notification.target)
end

Should print if you're the one with a low rank. Print simplified message if you're not lead. Then whisper only if it's not you and you're lead.

commented

I also did an RFK earlier today and fixed some additional pet handling logic.

Pets and whisper actually being obeyed should fix issues reported in this case. Thanks for the collaboration!

commented

That's the part that errors (which will need a fix regardless, after the issue is found) but that's not really intuitive.

I mean me having toggled /ranksentinel whisper to false and the addon still trying to whisper other players.
I'll probably often be lead by default when I'm the only player with the addon in my group.
What's the intent of the whisper option then? ๐Ÿ˜„

commented

I completely misunderstood what you were saying earlier. Now I follow and ๐Ÿคฆ . 3f907e7

I locally hacked up

self.playerGUID = UnitGUID("Player");
self.playerName = UnitName("Player");

to

    self.playerGUID = UnitGUID("Player") .. 'a'
    self.playerName = UnitName("Player") .. 'a'

then commented this out.

if not isInGroup then return end

Was able to send myself whispers without issue.

If you did have whisper disabled, I think that does explains your errors coupled with the now-fixed (3f907e7) whisper bug.

else
msg = fmt(self.notifications.Base, sourceName, spellLink,
abilityData.Rank, by, nextRankLevel)
msg = fmt("%s %s", self.notifications.Prefix.Self, msg)
msg = msg:gsub(addonName, self.cluster.lead)
end
was building a self post message, then ProcessQueuedNotifications wasn't obeying that setting so sent a self-formatted message as a whisper.

commented

Without reloading UI with 3f907e7, and whisper false, I can repro with my above playerFoo and IsInGroup hacks.

Reloading with latest/HEAD, I get the simplified local print for myself as fake-not-lead.