Skip to content

[Retail 12.0] Tooltip/_Core.lua:160 - Taint error on unit tooltip (UnitIsAFK secret boolean) #226

Description

@devRavit

Environment

  • WoW Version: 12.0.5 (Retail)
  • SUI Version: 12.0.4 (2026-03-14)

Description

When hovering over a party/raid member's unit frame, the following Lua error is thrown repeatedly:

Interface/AddOns/SUI/Modules/Tooltip/_Core.lua:160: attempt to perform boolean test on a secret boolean value (tainted by 'SUI')

Steps to Reproduce

  1. Enable SUI Tooltip module with Style set to "Custom"
  2. Hover over a party or raid member's unit frame while in combat
  3. Error fires repeatedly (80+ times per session)

Root Cause

In _Core.lua line 160, UnitIsAFK(unit) returns a secret boolean in WoW 12.0's new security model. Performing a direct if test on it causes a taint violation:

-- Line 160 (problematic)
if UnitIsAFK(unit) then
    self:AppendText((" |cff%s<AFK>|r"):format(cfg.afkColorHex))
end

This is similar to the already-reported issue in #221 (raidIconIndex secret value), but affects a different line and function.

Suggested Fix

UnitIsAFK() returns a secret boolean that cannot be tested in any form during combat — even via pcall, the returned value itself causes a taint error when used in a conditional.

The correct fix is to skip the check entirely during combat using InCombatLockdown():

-- Fix: skip AFK check during combat (secret boolean cannot be tested while tainted)
if not InCombatLockdown() and UnitIsAFK(unit) then
    self:AppendText((" |cff%s<AFK>|r"):format(cfg.afkColorHex))
end

Since players cannot be AFK during combat, this fix has no functional impact on the AFK display feature.

Related Issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions