PitBull Unit Frames 4.0

PitBull Unit Frames 4.0

5M Downloads

[BCC] LibHealComm-4.0 errors

Road-block opened this issue · 5 comments

commented

I know this is not the addon to submit issues for embeds but the whole LibHealComm situation is a clusterf...

I've tried to post issues/pr to a few of the active branches so it stops crashing when there's spells / ranks missing from the static portion of its internal database and instead fail gracefully and potentially inform the user what's missing so they can submit a ticket, but authors are either inactive or each addon is using a different branch.

Azilroka's branch wasn't much better but since switching back to the curseforge hosted version (the official I guess) I'm getting spammed with these.

20x ...\VisualHeal\Libs\LibHealComm-4.0\LibHealComm-4.0-99.lua:2190: table index is nil
[string "@PitBull4\Modules\VisualHeal\Libs\LibHealComm-4.0\LibHealComm-4.0-99.lua"]:2190: in function '?'
[string "@PitBull4\Modules\VisualHeal\Libs\LibHealComm-4.0\LibHealComm-4.0-99.lua"]:2827: in function <...\VisualHeal\Libs\LibHealComm-4.0\LibHealComm-4.0.lua:2825>

even in L70 groups where the other branch was more complete (it still gave errors for mostly the same underlying reason - missing spells or ranks from the static db it uses - but at least it was mostly in leveling groups with lower rank spells)

commented

I just realized the version hosted on curseforge is actually this clone https://github.com/doadin/LibHealComm-4.0 from the author of Plexus?

No, it's not a clone, just seems to be his own copy. The CF version seems to be Azilroka's fork looking at the commit history, but since he removed his GitHub repo I can't check.

If you want to catch the error, you could try

 LibHealComm-4.0.lua | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/LibHealComm-4.0.lua b/LibHealComm-4.0.lua
index 933d809..9845f47 100644
--- a/LibHealComm-4.0.lua
+++ b/LibHealComm-4.0.lua
@@ -2166,6 +2166,9 @@ local eventRegistered = {
 	SPELL_AURA_REMOVED_DOSE = true,
 }
 
+local errorSpells = {}
+HealComm.errorSpells = errorSpells
+
 function HealComm:COMBAT_LOG_EVENT_UNFILTERED(...)
 	local timestamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags = ...
 	if( not eventRegistered[eventType] ) then return end
@@ -2185,6 +2188,15 @@ function HealComm:COMBAT_LOG_EVENT_UNFILTERED(...)
 
 			updateRecord(pending, destGUID, amount, stack, endTime, ticksLeft)
 
+			if( not spellID ) then
+				if( not errorSpells[spellID] ) then
+					if( not spellName ) then spellName = "MISSING" end -- ... just in case
+					errorSpells[spellID] = spellName
+					print(format("LibHealComm-4.0: No spell ID for spell %s (%s)", spellName, eventType))
+				end
+				return
+			end
+
 			if( pending.isMultiTarget ) then
 				bucketHeals[sourceGUID] = bucketHeals[sourceGUID] or {}
 				bucketHeals[sourceGUID][spellID] = bucketHeals[sourceGUID][spellID] or {}

Then you can dump the list with /dump LibStub("LibHealComm-4.0").errorSpells

commented

I'm probably just going to rip the lib out and switch back to the Blizzard API

commented

I just realized the version hosted on curseforge is actually this clone https://github.com/doadin/LibHealComm-4.0 from the author of Plexus?

commented

Can't index the thing that's missing for the error table but is along the lines of what I had in mind.
I'll run something like this.

if (not spellID) then
	if not spellName then spellName = "MISSING" end
	if not errorSpells[spellName] then
		local target = destUnit and destName or "NO TARGET"
		errorSpells[spellName] = {eventType, target}
		print(format("%s.%s: No spell ID for spell %s (%s, %s)",major, minor, spellName, eventType, target))
	end
	return
end

Sorry for not checking back earlier, I just lowered the minor on the visualheal embedded LHC so my standalone LHC could take over which did not error spam

PS. Then the real question is where to submit issues so they have a chance to get fixed 🥲

commented

Had a chance to get a partial dump from Karazhan

[1]={
  Lifebloom={
    [1]="SPELL_PERIODIC_HEAL",
    [2]="Halfaprayer"
  },
  Rejuvenation={
    [1]="SPELL_PERIODIC_HEAL",
    [2]="Bushido"
  },
  ["First Aid"]={
    [1]="SPELL_AURA_APPLIED",
    [2]="Bushido"
  },
  Regrowth={
    [1]="SPELL_PERIODIC_HEAL",
    [2]="Bushido"
  }
}

I've also seen a Tranquility debug message but was in a previous session and I didn't save it.
If all the HoTs error it's practically useless, it's the only stuff not covered by the Blizz API, only reason to have LHC4.