Dicebar / Raven

Raven add-on for World of Warcraft
9 stars 3 forks source link

Bug - Probably Font or Colour related display issues #22

Open lakhpache opened 1 year ago

lakhpache commented 1 year ago

I'm having issues with profiles on some of my characters. Some work, some do not. I think it's related to which fonts or colours they were initially setup with.

BagSack catches the following error when I have the problem:

25x Usage: self:SetTextColor(color [, a]) [string "=[C]"]: in functionSetTextColor' [string "@Raven/Nest.lua"]:1776: in function <Raven/Nest.lua:1549> [string "@Raven/Nest.lua"]:2717: in function Nest_Update' [string "@Raven/Main.lua"]:1244: in functionUpdate' [string "@Raven/Main.lua"]:908: in function <Raven/Main.lua:904>

Locals: (*temporary) = "Usage: self:SetTextColor(color [, a])" `

And when I try to change fonts I get a chat output message:

Raven: Tukui/ElvUI font currently enabled, change on Defaults tab to use custom fonts

despite the fact I do not have Tukui/ElvUI installed & haven't in the last decade (plus I've been through at least two fairly full reinstalls since so I'd be highly surprised if any remnants remain).

Actual effect on the addon's output is very variable. Sometimes it completely stops displaying any buffs until I reload UI. Sometimes it just won't let me alter the font. Mostly I can solve it by reloading & fishing around until I find a character whose buff setup isn't corrupted to copy over the current one.

Edit: This is on live btw, not classic, using the most recent curseforge build.

Dicebar commented 1 year ago

I've seen this error pop up a few times, I'll have a look at it tomorrow.

Dicebar commented 1 year ago

For... Raven: Tukui/ElvUI font currently enabled, change on Defaults tab to use custom fonts

Raven seems to check for a type of modification Tukui/ElvUI does on Raven. It's quite possible a different addon has copied or implemented their own version of this hook, and it's leading to an incorrect/incomplete error message. Do you have any other addons installed that modify the appearance of your UI?

I rolled out an update that hopefully fixes this regardless, but it would be nice to find the culprit and see if we can make it integrate properly.

The SetTextColor error is more complicated. Usually that's caused by something underlying going wrong, not sending the proper data because it's going wrong, and throwing an error there. Hopefully that was caused by the incorrect TukUI detection.

Could you check the latest version to see if this helped? It should be r616 or greater, it may take an hour or two for the update to show up on CurseForge.

lakhpache commented 1 year ago

I've updated to r616 & swapped to my most problematic character profile.

It seems to be better but not fixed. I can modify things now & normally have them commit, but the moment I trigger "Toggle Test Mode" I get an error that is nearly-but-not-quite identical to my original one:

28x Usage: self:SetTextColor(color [, a]) [string "=[C]"]: in functionSetTextColor' [string "@Raven/Nest.lua"]:1776: in function <Raven/Nest.lua:1549> [string "@Raven/Nest.lua"]:2717: in function Nest_Update' [string "@Raven/Main.lua"]:1244: in functionUpdate' [string "@Raven/Main.lua"]:908: in function <Raven/Main.lua:904>

Locals: (*temporary) = "Usage: self:SetTextColor(color [, a])"`

So it's highlighting line 1244 now too, and providing less info on SetTextColor. So far I have not managed to get it to say anything about Tukui/Elvui, which previously was quite easy to do - I suspect you've squashed that bug.

Somewhat interestingly the most problematic profile has two groups - a Buffs group (all buffs, icons) and a Short Buffs (bars, Timer option: show if less than 2:00) group.

The test mode displays the Buffs group but that group does not respond to any appearance configuration changes. However the test mode does not display a test selection for the Short Buffs bar group in any form whatsoever.

If I copy in a non-problematic profile - even one which has two or three bar groups - I can use test mode perfectly normally & get no errors.

As far as other UI mods go...

I tried logging onto an old alt+server & disabling every addon except Raven, BugSack & BugGrabber, then swapping to my most problematic profile. Raven was actually even more reliably problematic, but still had no complaining about Tukui/Elv.

It was exactly the same error, but it occurred the moment I tried casting an ability that gave me a buff (remorseless winter), and it refused to display any new buffs whatsoever from then on (but continued to show the Cyclonic Inspiration buff I had on before messing with profiles - the character is an abandoned 35 alliance DK sitting in Shrine of Seven stars back in Pandaria).

Normally I'm using an extensive but not wildly unusual collection of UI altering addons.

For reference the major obviously UI related addons I have at present are: Bartender 4, Shadowed Unit Frames, Threatplates, WeakAuras, BlizzMove, CursorTrail, Gnosis, Mapster, idTip, OmniCC, SexyMap.. and not obviously UI related but pretty invasive: Altoholic. I've got about another 10-15 mostly usual suspect type addons in addition (DBM, SavedInstances, WorldQuestTracker, etc).

However I turned everything off for the old alt test.

Dicebar commented 1 year ago

That's a ton of good info, thanks!

Could you upload your Raven.lua an an attachment? I'd like to use it to try to reproduce the bug accurately/consistently.

lakhpache commented 1 year ago

It's large, I have a lot of characters & there's pre-server xfer versions in there too..

The most problematic profile is Urdhr-Frostmourne.

It was original a copy from Urdhr-Barthilas which I suspect is problematic itself but I'm not sure, and the Enhance profile was an attempt at fixing Urdhr which may have got messed up. I have had issues with Default, haven't checked it since your update.

I definitely do not have issues with Blupache-Frostmourne & I'm pretty sure Lakh-Barthilas is unproblematic, they tend to be my 'safe config' overwrite.

Character I tried testing things on was Lakh-Galakrond, and the assorted temp-testing are different versions of the Urdhr-Frostmourne I was messing with.

Most of them are pretty similar but there's literal years of things bouncing around & being modified slightly each time in there.

Raven.zip

Dicebar commented 1 year ago

Well... Got good news and bad news.

The bad news is that your profile is corrupt. We've been seeing this type of corruption pop up here and there (including my own profile), and suspect there may have been a bug during the migration to 10.0 in one of the dependencies that Raven uses to store profile data.

In this case, color codes that are supposed to be stored using 4 digits (RGBA) have only 2 digits according to the profile, leading to a faulty color code.

The good news is that I have a working solution to resolve this corruption automatically, but it's proving to be quite a bit of work to get the fix to a level of quality level that's suitable for a release. I'm going to try to get the full solution out before the end of the week. Possibly on the alpha or beta channel, depending on the insight of my future self.

Dicebar commented 1 year ago

What you could do, if you wanted to manually fix your profile, is open the Raven.lua file with your editor of choice and look for "0.8588". Then replace any 2 line entry with this 4 line version:

["a"] = 1,
["b"] = 0,
["g"] = 0.858823529411765,
["r"] = 1,

I think that should fix the main offenders. Be sure to backup your profile before you do, though.

lakhpache commented 1 year ago

Thanks for that - was above & beyond anything I expected, hope you get the general case sorted.

Edit: Your mention of 10.0 transition makes sense too btw - the Urdhr-Frostmourne character was only created in the very early days of 10.0 patch & so its profile would date from then. Most of the others are older & wouldn't have been modified at that point.

Dicebar commented 1 year ago

You're welcome!