Thread Tools Display Modes
07-19-17, 08:16 PM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Duration text disappeared for some random aura buttons

Hi,

This thread is somewhat related to a thread here.

I've been implementing auras element to my UI and found some strange bug(?) which also happens on my other addon as it is shown a thread above.

Basically I haven't touched anything apart from buffs and debuffs frame creation, and am using default aura button creation provided by oUF.

Lua Code:
  1. function GenerateBuffs(frame, unit)
  2.     local buffs = CreateFrame("Frame", "$parentBuffs", frame);
  3.     buffs:SetPoint("BOTTOMLEFT", frame, "TOPLEFT", 0, 25);
  4.     buffs:SetSize((ICON_SIZE + 1) * (ICON_PER_ROW - 1) + ICON_SIZE, (ICON_SIZE + 1) * (ICON_PER_COL - 1) + ICON_SIZE);
  5.  
  6.     buffs.size = ICON_SIZE;
  7.     buffs.spacing = 1;
  8.     buffs.num = ICON_PER_ROW * ICON_PER_COL;
  9.  
  10.     return buffs;
  11. end
  12.  
  13. function GenerateDebuffs(frame, unit)
  14.     local debuffs = CreateFrame("Frame", "$parentDebuffs", frame);
  15.     debuffs:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", 0, 25);
  16.     debuffs:SetSize((ICON_SIZE + 1) * (ICON_PER_ROW - 1) + ICON_SIZE, (ICON_SIZE + 1) * (ICON_PER_COL - 1) + ICON_SIZE);
  17.  
  18.     debuffs.size = ICON_SIZE;
  19.     debuffs.spacing = 1;
  20.     debuffs.num = ICON_PER_ROW * ICON_PER_COL;
  21.     debuffs["growth-x"] = "LEFT";
  22.     debuffs.initialAnchor = "BOTTOMRIGHT";
  23.  
  24.     return debuffs;
  25. end

However, for some random aura buttons, it starts to not show duration (cooldown text, cd:GetRegions()) as it is shown below.



At least I tested it on Rogue, Druid and Death Hunter, but they all had a same issue.

Unfortunately, this is sooooooooooooo random and I can't really think of the process to re-produce this issue.

I'm currently thinking that this would be an internal Lua bug with Blizzard's code, but who knows

Last edited by Layback_ : 07-19-17 at 08:22 PM.
  Reply With Quote
07-19-17, 11:05 PM   #2
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
It's indeed a Blizz bug.

It happens to bag item buttons quite regularly.

__________________
  Reply With Quote
07-19-17, 11:15 PM   #3
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by lightspark View Post
It's indeed a Blizz bug.

It happens to bag item buttons quite regularly.

Glad it's not an error of mine
(Trying to figure out where my codes are going wrong was pain in the...)

Guess it started to happen to me since 7.2 or 7.2.5 maybe...

Hope they are aware of this and fix it on 7.3

Last edited by Layback_ : 07-19-17 at 11:17 PM.
  Reply With Quote
07-19-17, 11:19 PM   #4
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by Layback_ View Post
Glad it's not an error of mine

Guess it started to happen to me since 7.2 or 7.2.5 maybe...

Hope they are aware of this and fix this on 7.3
Nah, it's been happening since WoD at least

You're just unlucky because it happens to your aura CDs

-- edit #1

K, I was right. Try adding this line to your CD-related code, after you set it for instance, you might need to use PostUpdateIcon callback.

Lua Code:
  1. cooldown:SetHideCountdownNumbers(false)

Something sets this flag to true internally (from C, not from Lua). I'll report this bug today w/ this info. It's been awhile since this bug appeared, I guess it's time to finally report it
__________________

Last edited by lightspark : 07-19-17 at 11:40 PM.
  Reply With Quote
07-19-17, 11:49 PM   #5
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by lightspark View Post
Nah, it's been happening since WoD at least

You're just unlucky because it happens to your aura CDs

-- edit #1

K, I was right. Try adding this line to your CD-related code, after you set it for instance, you might need to use PostUpdateIcon callback.

Lua Code:
  1. cooldown:SetHideCountdownNumbers(false)

Something sets this flag to true internally (from C, not from Lua). I'll report this bug today w/ this info. It's been awhile since this bug appeared, I guess it's time to finally report it
Yeay!

Quick question.

Does that function has to be called every single update (like PostUpdateIcon as you said)? or could it be done once via button creation (such as PostCreateIcon)?

Great to see that there is at least a temporary solution
  Reply With Quote
07-19-17, 11:55 PM   #6
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by Layback_ View Post
Yeay!

Quick question.

Does that function has to be called every single update (like PostUpdateIcon as you said)? or could it be done once via button creation (such as PostCreateIcon)?

Great to see that there is at least a temporary solution
I can't answer this question because I dunno why and when this flag is set. It might be reset repeatedly, it might a one time thingy.

Try adding this line to CreateIcon override if you use one, otherwise add it to PostCreateIcon, if it doesn't help, then PostUpdateIcon is your only hope
__________________
  Reply With Quote
07-19-17, 11:58 PM   #7
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by lightspark View Post
I can't answer this question because I dunno why and when this flag is set. It might be reset repeatedly, it might a one time thingy.

Try adding this line to CreateIcon override if you use one, otherwise add it to PostCreateIcon, if it doesn't help, then PostUpdateIcon is your only hope
All good!

Thanks for your help !!!
  Reply With Quote
07-19-17, 11:59 PM   #8
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by Layback_ View Post
All good!

Thanks for your help !!!
You're welcome
__________________
  Reply With Quote
07-20-17, 01:51 AM   #9
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Just have done some play test with :SetHideCountdownNumbers(false).

Basically it seems like you only need to call that function once per button creation.

So, if you are suffering with same issue, just call :SetHideCountdownNumbers(false) on your overrided CreateIcon function or via callback function, PostCreateIcon.

Lua Code:
  1. local cd = CreateFrame("Cooldown", "$parentCooldown", button, "CooldownFrameTemplate");
  2. cd:SetAllPoints();
  3. cd:SetReverse(true);
  4. cd:SetDrawEdge(true);
  5. cd:SetHideCountdownNumbers(false);
  Reply With Quote
07-30-17, 09:38 AM   #10
Sythral
A Kobold Labourer
 
Sythral's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 1
Really appreciate you both sharing this useful information. I too was having this issue with a few of my addons.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Duration text disappeared for some random aura buttons


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