Quantcast
Question about GameTooltip - WoWInterface
Thread Tools Display Modes
03-13-18, 11:18 AM   #1
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Question about GameTooltip

Is there a way to "reset" GameTooltip back to its default state? Or, failing that, a way to interrogate it in detail?

I've had this problem for ages and because it's sporadic it's been impossible to track down. At some (seemingly) random point the tooltips will stop showing all their information, and this persists until the client is reloaded. I'm assuming some errant fragment of code is hiding elements (as no errors are thrown) but that's just a guess.

I'm hoping there's something simple and obvious I'm missing.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
03-13-18, 11:41 AM   #2
Kanegasi
A Firelord
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 488
This is a relatively old and very weird Blizzard bug. Ping the minimap to bring the tooltips back.
  Reply With Quote
03-13-18, 11:45 AM   #3
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by Kanegasi View Post
This is a relatively old and very weird Blizzard bug. Ping the minimap to bring the tooltips back.

I'm not sure how to respond to that (laugh? cry? slam head into desk?) but I will certainly try it.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
03-13-18, 12:23 PM   #4
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Is that the bug they are talking about?

Are you getting empty tooltips, or instantly disappearing tooltips? The latter is indeed fixed by pinging the minimap, for whatever reason.
  Reply With Quote
03-13-18, 12:36 PM   #5
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by Kanegasi View Post
This is a relatively old and very weird Blizzard bug. Ping the minimap to bring the tooltips back.
Nope, doesn't work.

It looks like this when it should look like this
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail

Last edited by VincentSDSH : 03-13-18 at 12:47 PM.
  Reply With Quote
03-13-18, 12:41 PM   #6
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
Originally Posted by VincentSDSH View Post
It looks like this when it should look like this
Hum, I am pretty sure that right side picture does NOT correspont to standard UI tooltip.
__________________
"In this world nothing can be said to be certain, except that fractional reserve banking is a Ponzi scheme and that you won't believe it." - Mandrill
  Reply With Quote
03-13-18, 12:45 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,734
Hmm... but the one on the left is also not showing all of the item's stats or durability.

What addon(s) are you using to add information/lines to the tooltip? Try running without it to see if that fixes the problem.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh


Last edited by Seerah : 03-13-18 at 07:56 PM. Reason: oops - I know my left from my right, I swear!
  Reply With Quote
03-13-18, 01:22 PM   #8
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Definitely not the stock tooltips and I've got several that modify it. I can rule out a few b/c it existed before I started using them. (This isn't something new, it's been around for...late Vanilla/early BC I think, I've just gotten fed up with it)

I'm pretty sure (99.999%) it's caused by an addon but it's so bloody intermittent that turning off this or that addon doesn't tell me anything. I've had it happen 5 times to day, 0 times the last two days, once the day before that...

As it's addon-data that's getting occluded, if I don't run those addons, how do I know if it's happening or not? so there's that little annoyance. Most of the data is from Pawn, which is the only one that I've run long more-or-less as long as I've seen this crop up; however, I know of no one else using Pawn reporting the problem, so it's got to be something unique to the combination of addons I use. As I said, though, as it can be several days (or longer) between flareups, I can't get any negative data in then amount of time before I go bonkers for not having the addons -- and, yes, the alpha is killing me in that regard.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
03-13-18, 07:59 PM   #9
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,734
Yes, but it's not only addon data that is being excluded.

My guess is that something is failing silently (I assume you have errors enabled), preventing the rest of the lines from being added to the tooltip. (The vendor text is a separate frame, iirc. But I might be thinking of something else - it's been a while since I've looked at the source code.)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
03-13-18, 09:07 PM   #10
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,059
It looks like an addon is cutting off every line of your tooltip after the 9th and leaving the price string (without its label), or is adding it separately. Is this how every item tooltip is displayed? Does this only affect the tooltip on your character sheet, inventory, or chat links?

I'd start with the addon that thinks you've "learned" your boots, then move on to everything else that touches the tooltip, particularly anything you might have written yourself or is marked as outdated if you think this has been happening for more than 10 years.

We need a list of every addon you're running to even venture a guess as to what might be causing this.
  Reply With Quote
03-13-18, 10:30 PM   #11
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by semlar View Post
It looks like an addon is cutting off every line of your tooltip after the 9th and leaving the price string (without its label), or is adding it separately. Is this how every item tooltip is displayed? Does this only affect the tooltip on your character sheet, inventory, or chat links?
I think it's just item tooltips but to be honest, I reload the UI almost immediately b/c I usually need the info right then. I don't recall noticing other types of tooltips affected but I'm not sure what tooltips to look at to see that kind of problem (something with many lines of text).

Originally Posted by semlar View Post
I'd start with the addon that thinks you've "learned" your boots, then move on to everything else that touches the tooltip, particularly anything you might have written yourself or is marked as outdated if you think this has been happening for more than 10 years.
It's not that, that's CanIMogIt or something like that, and this irritating problem has existed long before transmog was even a thing. The only tooltip-modifying addon that has been around more-or-less as long as I've run into this is Pawn but I doubt it's the culprit or others would have it happen as well.

Originally Posted by semlar View Post
We need a list of every addon you're running to even venture a guess as to what might be causing this.
Blerg, ok. [Edit: here are the active ones, but this is way overkill]

!BlizzBugsSuck
!BugGrabber
acb_CastBar
acb_Mirror
Ara_Broker_Guild_Friends
Ara_Broker_Reputations
ArkInventory
ArkInventoryConfig
ArkInventoryRules
AuctionLite
AutoLootPlus

AzCastBar
AzCastBarOptions
BelowAverageItems
BetterAddonList
Broker_Calendar
Broker_Garrison

BugSack
CanIMogIt
ChatLoot
ChronoBars
DejaCharacterStats
Dominos
Dominos_Config
DragEmAll

ElkBuffBars
ExecutiveAssistant_GraveDiggerIntern
ExecutiveAssistant_MinderMinderIntern
ExecutiveAssistant_OccupiedIntern
ExecutiveAssistant_QuestIntern
Executive_Assistant
Executive_Assistant_FileCabinet
Fortress

GatherMate2
GCDRing
GoGoMount
GoGoMount_ExtraMounts
GTFO
HandyNotes
HandyNotes_Argus
HandyNotes_BrokenShore
HandyNotes_LegionClassOrderHalls
HandyNotes_LegionRaresTreasures
HandyNotes_LegionTreasures
HandyNotes_WorldMapButton

Identity
InFlight
InFlight_Load
InspectorGadgetzan
InstancePortals
Kui_Media
Kui_Nameplates
Kui_Nameplates_Core
Kui_Nameplates_Core_Config
Kui_Nameplates_Elite
Mapster
Masque
MikScrollingBattleText

MiniRack [-- custom reduction of ItemRack]
MouseUI [-- custom UI]
MSBTOptions
Notes
OPie
OPieMasque
OrderHallCommander

ParagonReputation
Pawn
Peddler
Postal
Prat-3.0
Prat-3.0_Libraries
QuestItemBar
ReGroup

SharedMedia
SharedMedia-Blizzard
Skada
Skillet
SorhaQuestLog
TipTac
TipTacItemRef
TipTacOptions
TipTacTalents
Toaster
TomTom
ToyPlus
WorldQuestGroupFinder
WorldQuestTab
WorldQuestTracker
XLoot
XLoot_Frame
XLoot_Group
XLoot_Master
XLoot_Monitor
XLoot_Options
xMerchant



Nota Bene: MouseUI is a fairly large UI replacement, from unit-frames to information displays to soup to nuts. Its tooltip handling is bland and straight-forward (except for border-swapping) and extensively tested and debugged in a minimal environment (dominos, fortress, bugsack/-grabber, MouseUI) with never a problem seen.

Italics denote addons that I'm fairly sure were added after the first time I noticed the issue.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail

Last edited by VincentSDSH : 03-13-18 at 11:18 PM.
  Reply With Quote
03-13-18, 10:45 PM   #12
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
If it's not any specific addon, it can always be multiple addons that don't play well only when run together, still.
  Reply With Quote
03-13-18, 11:24 PM   #13
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by Ammako View Post
If it's not any specific addon, it can always be multiple addons that don't play well only when run together, still.
This is what I've long suspected but I've no way to prove it, nor can I fathom what's actually happening. I think the 'missing' elements are hidden but I can't find an addon that does it, so it seems to disprove that theory. I was hoping for a simple way to dump the active state so I could compare good/errant and work the vector-diagnosis backwards from that -- frame attributes window is awesome but I can't figure out how to capture a tooltip with it.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail

Last edited by VincentSDSH : 03-13-18 at 11:28 PM.
  Reply With Quote
03-14-18, 12:46 AM   #14
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,059
Originally Posted by VincentSDSH View Post
I think the 'missing' elements are hidden but I can't find an addon that does it, so it seems to disprove that theory.
It's fairly difficult to remove lines from the tooltip after it has been drawn, accidental or otherwise, and it shouldn't even be possible to interrupt the basic tooltip text from being written out because that's all handled C side.

Since you didn't mention whether this is affecting all tooltips or just ones that show up on specific frames, and since I have no idea what's in these 2 addons, the first things I would check are MiniRack and your MouseUI.
  Reply With Quote
03-14-18, 08:45 AM   #15
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by semlar View Post
...first things I would check are MiniRack and your MouseUI.
I thought I'd mentioned this already, but I'll expound on it.

I've spent, over the expansions/years this has cropped up, more hours than I want to admit to trying to isolate this but it is grossly intermittent. The only addons that I can absolutely say, due to the number of hours used in isolation, do not cause it are: MouseUI, Dominos, Fortress, BugSack/-Grabber.

Given the number of addons changed from first-sighting till today, I can say the Italicized in the list above are unlikely culprits, with the caveat that they might be built on ideas of the addons they replaced and/or create a similar influence themselves.

Minirack is a the scaled-back version of ItemRack to just do the flyouts for the character-frame, it doesn't use GameTooltip. MouseUI is my own code (with some fragmentary repurposing from discontinued addons) and I've a) reviewed every interaction with GameTooltip countless times and b) used it enough with the above-mentioned small number of addons to have high-confidence that it isn't a source in whatever is happening. It does absolutely nothing with item tooltips and all interactions are at the API level (:ClearLines(); :AddLine(), etc). Also, it only interacts with GameTooltip with its own objects, not items, etc.

Note that the updates from multiple addons (Pawn, AuctionLite, etc) are obscured by the sell-price is intact, and yet game-supplied stat data is also missing and the font-sizes have changed, almost like it's using an incorrect display mask (i.e., using pet-tooltip logic to display item-data) -- which might imply that the addons supplying the missing data aren't being triggered.

In the originating post, I asked if there was a way to reset GameTooltip or interrogate/inspect it because I've done the due-diligence in problem isolation and source identification.
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
03-25-18, 11:29 PM   #16
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Update for posterity and basic completeness.

I was able to provoke a salient error message using :SetFormattedText(). The "blank lines" have had their font set to nil and size 0. At this point I have no speculation of how the font is being set to nil as this seems to (quite rightly) produce an error when attempted from an Addon.

If a font is set, the data is immediately displayed.

One could automagically detect-and-correct but I think this is ill-advised and prefer to call the routine if/when detected (I have it launched from a slash-command personally).

Below is a universal version should it ever be of any use.

Lua Code:
  1. -- Scans the displayed GameTooltip for instances of nil font or  
  2. --    font-size of 0. If nil-font or 0-size, a font/size will be assigned.
  3. -- Nota Bene:  :NumLines() is the number of currently displayed lines
  4. --    so a long tooltip (e.g., item, etc) is best.
  5. function MouseUI:ScanAndRepairToolTip()
  6.     local gtt = GameTooltip
  7.        
  8.     for i=1,gtt:NumLines() do
  9.         local lineL = _G["GameTooltipTextLeft"..tostring(i)]
  10.         local lineR = _G["GameTooltipTextRight"..tostring(i)]
  11.  
  12.         local fontNameL, fontSizeL = lineL:GetFont()
  13.         if fontNameL == nil or fontSizeL == 0 then
  14.             print("Font Applied: L"..tostring(i))
  15.             lineL:SetFont("Fonts\\FRIZQT__.TTF", i==1 and 14 or 12)
  16.             lineL:SetJustifyH("LEFT")
  17.         end
  18.        
  19.         local fontNameR, fontSizeR = lineR:GetFont()
  20.         if fontNameR == nil or fontSizeR == 0 then
  21.             print("Font Applied: R"..tostring(i))
  22.             lineR:SetFont("Fonts\\FRIZQT__.TTF", i==1 and 14 or 12)
  23.             lineR:SetJustifyH("RIGHT")
  24.         end
  25.  
  26.     end
  27.     print("Finished Scanning/Fixing Tooltip ["..tostring( gtt:NumLines() ).."]" )
  28. end

To determine what font or size is used, or verify what's happening before the above, the below spits out data on all displayed lines.

Lua Code:
  1. function MouseUI:ScanTip()
  2.     local gtt = GameTooltip
  3.        
  4.     for i=1,gtt:NumLines() do
  5.         local fontNameL, fontSizeL = _G["GameTooltipTextLeft"..tostring(i)]:GetFont()
  6.         local fontNameR, fontSizeR = _G["GameTooltipTextRight"..tostring(i)]:GetFont()
  7.  
  8.         print(tostring(i).."L: "..tostring(fontNameL).." ["..tostring(fontSizeL).."]")
  9.         print(tostring(i).."R: "..tostring(fontNameR).." ["..tostring(fontSizeR).."]")
  10.     end
  11. end
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote
03-26-18, 06:54 AM   #17
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Originally Posted by VincentSDSH View Post
One could automagically detect-and-correct [b]but I think this is ill-advised[/i] and prefer to call the routine if/when detected (I have it launched from a slash-command personally).
Why?

I don't think there would be much overhead in running that function on gametooltip show to automatically correct the error and effectively never see it. Though that would be a bit hack-ish, but this solution already is.
Then again, we don't have access to your code to say whether or not there would be a more efficient solution.

I guess if it works for you that's all that counts, though. If you're the only one using that addon, anyway.
  Reply With Quote
03-26-18, 01:41 PM   #18
VincentSDSH
Non-Canadian Luzer!
 
VincentSDSH's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 350
Originally Posted by Ammako View Post
Why?

I don't think there would be much overhead in running that function on gametooltip show to automatically correct the error and effectively never see it.
Never bake a hack is why I think it's ill-advised.

Any time you don't know the source or cause of a problem, the corrective code is pretty-much a defacto hack. It's not good to make hacks seamless, the two biggest reasons of which are equally "forgotten problems are never fixed" and "you likely cover up errors that may help diagnose the underlying problem." And where you have to make them real-time seamless, the code should denote them with as much fan-fair as the Second Coming. (Not to mention that when code is around long enough, the baked-in hacks build up and are either obviated or interfere with other code or other hacks, leading to bugs, performance issues, and the dreaded 'timing problem')

If I ever do find the source of this silly behavior and it's something Blizzard doesn't let me reach, and conditionless brute-force scanning seems to be the only answer, doing it automatically (when > 6 lines) wouldn't be a terrible workaround, if it was coming up numerous times within a session. I, personally, don't encounter it enough to feel the need for it to actively scan even if it is ultimately determined the 'most logical workaround.'
__________________
AddonsExecutive Assistant User Configurable To-Do ListLegible Mail Choose the Font for Your Mail
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Question about GameTooltip

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off