Backupiseasy / ThreatPlates

Nameplate addon for World of Warcraft
https://wow.curseforge.com/projects/tidy-plates-threat-plates
35 stars 19 forks source link

Mouseover LUA Error #455

Closed Raiukage closed 1 year ago

Raiukage commented 1 year ago

I get this every time I mouse over a training dummy.

15x ...yPlates_ThreatPlates/Elements/MouseoverHighlight.lua:44: attempt to index field '?' (a nil value) [string "@TidyPlates_ThreatPlates/Elements/MouseoverHighlight.lua"]:44: in function <...yPlates_ThreatPlates/Elements/MouseoverHighlight.lua:36> [string "@TidyPlates_ThreatPlates/Elements/MouseoverHighlight.lua"]:121: in function <...yPlates_ThreatPlates/Elements/MouseoverHighlight.lua:121>

Locals: tp_frame = ThreatPlatesFrameNamePlate3 { 0 = CurrentAlpha = 1 Parent = NamePlate3 { } unitcache =

{ } widgets =
{ } style =
{ } IsOccluded = false UpdateMe = false Active = false visual =
{ } unit =
{ } } unitid = nil (temporary) = nil (temporary) = Frame { 0 = HighlightTexture = Texture { } Highlight = Frame { } NameHighlight = Texture { } } (temporary) = defined =[C]:-1 (temporary) = "attempt to index field '?' (a nil value)" UnitIsUnit = defined =[C]:-1 Addon =
{ UIScaleChanged = defined @TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:1863 CheckForIncompatibleAddons = defined @TidyPlates_ThreatPlates/Core.lua:315 Theme =
{ } UseUniqueWidget = true TotemCreatureType = "Totem" UnitStyle_CastTrigger_Reset = defined @TidyPlates_ThreatPlates/Styles/Styles.lua:324 UpdateExtensions = defined @TidyPlates_ThreatPlates/Widgets/TidyPlatesExtensions.lua:90 AurasFilterMode =
{ } IS_MAINLINE = true UpdateConfigurationStatusText = defined @TidyPlates_ThreatPlates/Functions/healthtext.lua:354 SetThemes = defined @TidyPlates_ThreatPlates/Styles/init.lua:17 ANCHOR_POINT_SETPOINT =
{ } CheckTableStructure = defined @TidyPlates_ThreatPlates/Init.lua:342 CVars =
{ } THREAT_VALUE_TYPE =
{ } InitializeCustomNameplates = defined @TidyPlates_ThreatPlates/Options.lua:395 ImportProfile = defined @TidyPlates_ThreatPlates/Database.lua:1555 ProfChange = defined @TidyPlates_ThreatPlates/Options.lua:10439 SpecName = defined @TidyPlates_ThreatPlates/Core.lua:127 GetThreatStyle = defined @TidyPlates_ThreatPlates/Styles/Styles.lua:178 SetStyle = defined @TidyPlates_ThreatPlates/Styles/Styles.lua:335 OpenOptions = defined @TidyPlates_ThreatPlates/Options.lua:10503 SetThreatColor = defined @TidyPlates_ThreatPlates/Functions/threatcolor.lua:38 MigrateDatabase = defined @TidyPlates_ThreatPlates/Database.lua:1337 CustomPlateGetHeaderName = defined @TidyPlates_ThreatPlates/Options.lua:377 Font =
{ } ForceUpdate = defined @TidyPlates_ThreatPlates/TidyPlatesInternal/TidyPlatesCore.lua:1944 UpdateStyleForStatusText = defined @TidyPlates_ThreatPlates/Functions/healthtext.lua:342 UnitStyle_AuraTrigger_UpdateStyle = defined @TidyPlates_ThreatPlates/Styles/Styles.lua:276 UpdateCustomStyleIcon = defined @TidyPlates_ThreatPlates/Widgets/UniqueIconWidget.lua:189 LEGACY_CUSTOM_NAMEPLATES =
{ } Animations =
{ } UnitStyle_NameDependent = defined @TidyPlates_ThreatPlates/Styles/Styles.lua:198 SplitByWhitespace = defined @TidyPlates_ThreatPlates/Init.lua:369 CurrentVersionIsOlderThan = defined @TidyPlates_ThreatPlates/Database.lua:621 CallbackWhenOoC = defined @TidyPlates_ThreatPlates/Core.lua:429 IsPlayerQuestUnit = defined @TidyPlates_ThreatPlates/Widgets/QuestWidget.lua:183 DEFAULT_SMALL_FONT = "Arial Narrow" ANCHOR_POINT_TEXT =
{ } Truncate = defined @TidyPlates_ThreatPlates/Localization.lua:69 ImportCustomStyle = defined @TidyPlates_ThreatPlates/Database.lua:1515 CheckForFirstStartUp = defined @TidyPlates_ThreatPlates/Core.lua:283 GLOW_TYPES =
{ } Element_Mouseover_Create = defined @Add

Backupiseasy commented 1 year ago

This does not happen for me, but it was reported before (and I thought that i fixed it, see https://github.com/Backupiseasy/ThreatPlates/issues/443). There seems to be a certain situation when this happens, but I don't know what this situation is as I cannot reproduce this error.

I'll try to fix it - that should be possible - and post an update here for you to test.

Backupiseasy commented 1 year ago
Raiukage commented 1 year ago

Duplicated where I was and what I was doing as well as I could, and mousing over didn't throw any errors. Although, that being said, there is another problem I have been having with the past couple builds, usually more an annoyance than anything. Sometimes, the threat plates for things...are misnamed. There is a less than 0% chance that I was mousing over the soup pot last night and didn't realize it wasn't actually a training dummy. (It was late and I was getting ready to log off for the night when I moused over a yellow "training dummy" plate from the entrance of the inn in Iskaara and started getting the error.)

Threat Plates - Soup Pot Training Dummy

Backupiseasy commented 1 year ago

Hm, the soup pot should not have a visible healthbar. Actually, it indeed has a healthbar, but it's hidden an only a widget (progressbar) should be shown normally. I am working on better handling these kind of namepaltes for 11.2, but still - in 11.1 - this healthbar should not be shown at all. Do you have Blizzard nameplates enabled for hostile/friendly units (not friendly it seems based on the screenshot).

BTW, does this happen with the updated version above as well?

Raiukage commented 1 year ago

I updated to the version you gave me before I logged in. Can't log in right now to confirm, but I usually have Hostile nameplates enabled on the Blizzard side.

Backupiseasy commented 1 year ago

Here's an updated version of the version above: while working on a fix for a bug after mind-control was used, I might have added a bug that could result in healthbars for units showing that should not be shown: https://drive.google.com/file/d/1-G9JaqqQJDQuM51MVuhn6PbvE04u29h7/view?usp=sharing

Raiukage commented 1 year ago

Hmm. Updated to the new version you just sent me and no change. Mouseover error is still gone, but the pot still is convinced it's a training dummy. I logged out at the location and logged back in; when I first logged in, the plate did not appear, but when I did a quick flight circle out of Iskaara and back in, it was back. I have Enemy Unit Nameplates turned on Blizzard side (but not minions/minor). If I logged out and back in and didn't leave the immediate area, the plate didn't appear. ...Then the feast started. After the feast, I took another fly-about, and when I came back, the pot had decided it no longer wanted to be a training dummy - it wanted to be a Icecling Ottuk instead. XD (This is when the pot was interactable with soup.)

Raiukage commented 1 year ago

Oops. Closed by accident.

Backupiseasy commented 1 year ago

What is weird is that there have been cases where nameplate was shown although it should have been hidden, but what's new here is the wrong name. Normally, when a nameplate is no longer used, TP deletes all unit information, i.e., the name is empty. So, even if a healthbar is shown where it shouldn't, it should have the correct name.

There once was a similar side-effect (and still is, in Wrath Classic) with another addon that also modified totem nameplates. Can you test the following:

  • Try the above with all addons disabled except Threat Plates
  • Create a new profile with default settings and see if this still happens. Note that CVars, like which nameplates are shown, are not stored in the profile. So if it still happens it might be related to a different CVar setting you have compared to me.
Backupiseasy commented 1 year ago

In the screenshot above, at the top of the nameplate there are two texts 0%. Is that something attached to the nameplate (from another addon)?

Raiukage commented 1 year ago

That is another addon, it is in no way attached to nameplates, just how the picture was angled.

I'll do all of the above tomorrow, I promise. Today, I've been running around doing errands all day, and I just got home and have more stuff I need to do before wind-down. Tomorrow, I have all day, and I'll start by outright removing everything and doing a UI reset :)

Raiukage commented 1 year ago

Well, I reset my UI entirely, put back in the new version you sent me above, went to Iskaara...and the pot's normal. Did a flyabout, and pot stayed normal. So it must either be a weird setting on my end or some sort of conflict. If I figure it out, I'll let ya know, but for now, looks like I have more investigating to do. Thank you for all your help!

Backupiseasy commented 1 year ago

I think that the most recent released verion 11.1.22 should have all fixes (like the above) version included, but I need to check again. Thanks a lot for trying to figure out with me what could be issue for this.