Error: Original call failed while running hooks: GameTooltip_OnHide
1 : Interface\FrameXML\GameTooltip.lua:154: attempt to index local 'self' (a nil value)
Interface\AddOns\Stubby\Stubby.lua:355: in function <Interface\AddOns\Stubby\Stubby.lua:325>
(tail call): ?
[string "*:OnHide"]:1: in function `OnHide'
Interface\AddOns\EQCompare\EQCompare.lua:381: in function <Interface\AddOns\EQCompare\EQCompare.lua:380>
(tail call): ?
[C]: in function `Hide'
Interface\FrameXML\UIParent.lua:1776: in function <Interface\FrameXML\UIParent.lua:1770>
[C]: in function `HideUIPanel'
[string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>
Which addon is causing the error? It happens when I click on a item in chat to see the tooltip and then click on the X to close the tooltip and this error happens all the time.
Well, there are two addons mentioned in the error message: Stubby and EQCompare. Since the error happens consistently, you can easily find out which (if either) addon is actually causing the error by disabling one, logging in, clicking an item link, and closing its tooltip. If the error still occurs, enable the one you'd disabled and disable the other one, and repeat. Once the error stops happening, you'll know that the disabled addon is the culprit.
You should then do one final test: log in with only the problem addon enabled, to make sure the problem still happens, and isn't an addon conflict.
Finally, you should report the problem to the addon's author so it can be fixed.
For reference, EQCompare has long been dead, essentially. Years old code, never fully updated for ages. Has had a couple random hacks over time to try to spark it off the table, but its in a terminal state.