Classic Era regression: SetBackdropColor() / SetBackdropBorderColor() throws “table index is nil” if called before first frame render, due to uninitialized backdropInfo inside BackdropTemplate

It seems since recent Classic Era client updates (mid-2025, 1.15.x+), many addons that use BackdropTemplate or call SetBackdropColor / SetBackdropBorderColor during early loading have started throwing the following error:

Message: Interface/AddOns//Main.lua line XXX:
table index is nil

It originates in Blizzard’s C-side implementation of BackdropTemplate, which stores its internal color/border data in a table called frame.backdropInfo.

In older builds:

  • SetBackdropColor() and SetBackdropBorderColor() were safe to call any time after CreateFrame() — even if the frame was hidden.

In current Classic Era builds:

  • backdropInfo isn’t created until the frame is actually rendered once on screen.
  • If any Lua code calls SetBackdropColor or SetBackdropBorderColor before that moment (for example, during ADDON_LOADED or PLAYER_LOGIN), the engine throws a C-level “table index is nil” before control even returns to Lua.
  • Wrapping the call in pcall() or using seterrorhandler() does not catch it, because it’s raised inside the client’s C-code, not Lua.

When it triggers

  • On cold login (especially when the affected frame is hidden, off-screen, or parented to UIParent before it’s drawn).
  • Not usually on /reload, because by then the frame has already been rendered once.
  • It’s intermittent and depends on addon load order, frame visibility, and UI scale.

Impact

  • The error is harmless but noisy.
  • It doesn’t break functionality — it only fires once on login.
  • Many addons that tint or recolor hidden frames (chat boxes, panels, config windows, etc.) are affected.

Known workarounds I’ve read up on

There doesn’t seem to be a full Lua-side fix but these methods reduce or hide the issue sometimes:

  1. Delay backdrop coloring until after PLAYER_ENTERING_WORLD and after the frame is visible.
  2. Use Container:HookScript("OnShow", function() ...color... end) instead of calling it immediately.
  3. Replace backdrops with plain textures (frame:CreateTexture() + SetColorTexture) instead of SetBackdropColor.

Unfortunately in my case none of these are working

Blizzard would need to restore a safe lazy initialization of backdropInfo or suppress the thrown error until the table is allocated, as it was in previous Classic clients (and possibly in retail Dragonflight?)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.