Quantcast
View Bug Report
Integer overflow killing world boss
Bug #: 8675
File: TipTop
Date: 12-20-16 02:39 PM
By: Aethra
Status: Fixed
Got this just now while killing Calamir. I had joined a party using World Quest Group Finder, first, though I don't suspect that is a factor.

It happened last night as well on a few times while doing M+ with friends. The # at the end of "the message" was different, but the content of the error was the same.

(I know nothing little this sort of thing, so I'm unsure what is relevant. Sorry!)



Code:
Message: integer overflow attempting to store 43576112000

Stack:
Interface\AddOns\TipTop\tiptop.lua:375: in function <Interface\AddOns\TipTop\tiptop.lua:336>
[C]: ?

Count: 1

Locals:
_ = GameTooltipStatusBar {
 0 = <userdata>
 SetStatusBarColor = <function> defined @Interface\AddOns\TipTop\tiptop.lua:115
}
hp = 435761120
per = nil
hpmult = "m"
hpdiv = 1000000
maxhpmult = "k"
maxhpdiv = 1000
hpformat = "%.1f"
maxhpformat = "%.1f"
maxhp = 1
hp = 435761120
db = <table> {
 guildRank = false
 raidIconX = "0"
 healthText = true
 raidIconSize = 29
 factionIconY = "-4"
 offsetX = "-17.001468658447"
 borderColor = <table> {
 }
 anchor = "RIGHT"
 bg = "Solid"
 sbarbgcolor = <table> {
 }
 healthBar = "Smooth v2"
 onCursor = false
 raidIconY = "0"
 font = "Calibri"
 textformat = "1.2k/1.2k (100%)"
 offsetY = "-224.33331298828"
 classIcon = false
 insideBar = false
 factionIconSize = 32
 scale = 1.1
 border = "Square Clean"
 bgColor = <table> {
 }
 elite = true
 factionIconPosition = "TOPRIGHT"
 inset = 0
 classIconStyle = "Default UI"
 factionIcon = false
 diffColor = true
 showTargetText = true
 sbarcolor = <table> {
 }
 borderWidth = 2
 fontFlag = "None"
 alpha = 0.70726606249809
 raidIconPosition = "TOP"
 classColor = true
 sbarclass = true
 topBar = false
 itemColor = true
 factionIconX = "-16"
 you = true
 showTalentText = true
 sbarbg = "BantoBar"
}
UnitHealthMax = <function> defined =[C]:-1
UnitHealth = <function> defined =[C]:-1
ttHealth = ttHealth {
 0 = <userdata>
}

RSS 2.0 Feed for Bug CommentsNotes Sort Options
By: Seerah - 12-20-16 09:56 PM
I think I see what the issue is here... The text tries to update itself whenever the statusbar changes or the mouseover unit changes. If you move your mouse off of a unit at the same moment the code tries to run, the mouseover unit no longer exists and a max health value of 0 is returned by the client.

Previously, I had just manually changed the 0 to a 1 to account for the division by 0 errors. However, with the HUUUUGE pools of health of today's bosses, dividing by max health and multiplying by 100 to get the percent results in a number too large for Lua to store in a variable (when the max health is set to 1).

Instead, I will probably cancel updating the text instead of manually switching it from 0 to 1. I would like to test it for a bit myself to make sure that it doesn't break anything before uploading the fix. In the mean time, you can switch to a text that doesn't display the percentage, or you can manually make this simple change yourself in the Lua file.

In tiptop.lua (you can open this with any text editor), search for the line
Code:
local function CalcHealth(_,hp)
Just below that will be this line
Code:
if maxhp == 0 then maxhp = 1 end
Remove that line and replace it with this
Code:
if maxhp == 0 then	return end