WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Question about GameTooltip (https://www.wowinterface.com/forums/showthread.php?t=56095)

VincentSDSH 03-13-18 11:18 AM

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.

Kanegasi 03-13-18 11:41 AM

This is a relatively old and very weird Blizzard bug. Ping the minimap to bring the tooltips back.

VincentSDSH 03-13-18 11:45 AM

Quote:

Originally Posted by Kanegasi (Post 327190)
This is a relatively old and very weird Blizzard bug. Ping the minimap to bring the tooltips back.

:eek:
I'm not sure how to respond to that (laugh? cry? slam head into desk?) but I will certainly try it.

Ammako 03-13-18 12:23 PM

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.

VincentSDSH 03-13-18 12:36 PM

Quote:

Originally Posted by Kanegasi (Post 327190)
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

Banknorris 03-13-18 12:41 PM

Quote:

Originally Posted by VincentSDSH (Post 327195)
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.

Seerah 03-13-18 12:45 PM

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.

VincentSDSH 03-13-18 01:22 PM

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.

Seerah 03-13-18 07:59 PM

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.)

semlar 03-13-18 09:07 PM

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.

VincentSDSH 03-13-18 10:30 PM

Quote:

Originally Posted by semlar (Post 327214)
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).

Quote:

Originally Posted by semlar (Post 327214)
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.

Quote:

Originally Posted by semlar (Post 327214)
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.

Ammako 03-13-18 10:45 PM

If it's not any specific addon, it can always be multiple addons that don't play well only when run together, still.

VincentSDSH 03-13-18 11:24 PM

Quote:

Originally Posted by Ammako (Post 327216)
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.

semlar 03-14-18 12:46 AM

Quote:

Originally Posted by VincentSDSH (Post 327218)
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.

VincentSDSH 03-14-18 08:45 AM

Quote:

Originally Posted by semlar (Post 327219)
...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.

VincentSDSH 03-25-18 11:29 PM

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

Ammako 03-26-18 06:54 AM

Quote:

Originally Posted by VincentSDSH (Post 327360)
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.

VincentSDSH 03-26-18 01:41 PM

Quote:

Originally Posted by Ammako (Post 327364)
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.'


All times are GMT -6. The time now is 10:01 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI