Skip to content

Fix 'Show' on bad self error for embedded tooltips#374

Open
ptarjan wants to merge 2 commits intoPeterodox:mainfrom
ptarjan:fix/embedded-tooltip-show
Open

Fix 'Show' on bad self error for embedded tooltips#374
ptarjan wants to merge 2 commits intoPeterodox:mainfrom
ptarjan:fix/embedded-tooltip-show

Conversation

@ptarjan
Copy link

@ptarjan ptarjan commented Mar 21, 2026

Summary

Fixes calling 'Show' on bad self (Usage: self:Show()) errors that happen when hovering PvP reward items (or anything using EmbeddedItemTooltipTooltip).

CallSubModules fires for all tooltip frames that inherit GameTooltipTemplate, but tooltip:Show() doesn't work on embedded tooltip frames. This just guards the call so it only runs on GameTooltip.

One-line change in Modules/GameTooltip_Core.lua.

Guard tooltip:Show() to only fire on GameTooltip, not on
embedded tooltip frames like EmbeddedItemTooltipTooltip that
don't support :Show() properly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Peterodox
Copy link
Owner

Hi again!

Is there a reliable way to reproduce this error? I think I've seen a bug report mentioning it, but I couldn't find it 🥲

I cannot approve this fix because:

  • The tooltip modules work not only for GameTooltip but also for other tooltips like ItemRefTooltip (that appears when clicking an item link in chat) as well.
  • Even if we wanted to apply these modules only to GameTooltip, the check would need to be on the first line inside the function. Because if you add additional lines to an already shown tooltip without calling tooltip:Show(), the texts will appear outside the tooltip, below.
  • I can /run EmbeddedItemTooltipTooltip:Show() in-game without any issue.

@ptarjan
Copy link
Author

ptarjan commented Mar 21, 2026

Good points, thanks for the detail.

You're right that filtering to just GameTooltip would break ItemRefTooltip. And if EmbeddedItemTooltipTooltip:Show() works fine in isolation, the issue might be something else — the error "calling 'Show' on bad self" usually means the tooltip argument isn't actually a frame at that point, or something weird is happening with the callback context. Maybe the tooltip has already been recycled/hidden by the time the post-call fires.

I don't have a deterministic repro yet — this came from analyzing BugGrabber errors after a whole play session. The tooltip involved was EmbeddedItemTooltipTooltip while hovering PvP reward items (itemID 258534). I'll work on getting a reliable repro and report back. Might be easier to figure out the right fix once we can trigger it consistently.

Per feedback: filtering to GameTooltip would break ItemRefTooltip
and other valid tooltips. pcall preserves the Show() call for all
tooltips while gracefully handling the edge case.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ptarjan
Copy link
Author

ptarjan commented Mar 21, 2026

Here's the full BugGrabber capture for reference:

Error:

Plumber/Modules/GameTooltip_Core.lua:131: calling 'Show' on bad self (Usage: self:Show())

Stack trace:

[Interface/AddOns/Plumber/Modules/GameTooltip_Core.lua]:131: in function 'CallSubModules'
[Interface/AddOns/Plumber/Modules/GameTooltip_Core.lua]:314: in function ...
[C]: in function 'securecallfunction'
[Interface/AddOns/Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:67
[Interface/AddOns/Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:87
[Interface/AddOns/Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:123
[C]: in function 'SetAttribute'
[Interface/AddOns/Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:148
[Interface/AddOns/Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:298
[C]: in function 'securecallfunction'
[Interface/AddOns/Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:242
[C]: ?
[Interface/AddOns/Blizzard_SharedXMLGame/Tooltip/TooltipDataHandler.lua]:517: in function 'SetItemByID'
[Interface/AddOns/Blizzard_GameTooltip/Mainline/GameTooltip.lua]:801: in function 'EmbeddedItemTooltip_SetItemByID'
[Interface/AddOns/Blizzard_PVPUI/Mainline/Blizzard_PVPUI.lua]:1723

Tooltip: EmbeddedItemTooltipTooltip (embedded inside GameTooltip's ItemTooltip)
Item: 258534 (Illustrious Contender's Strongbox)
Context: Hovering PvP rewards in the PvP UI
Counter: 32 (fired 32 times in one session)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants