jezzi23 / stat_weights_classic

Stat Weights Classic - Addon for World of Warcraft Classic
5 stars 3 forks source link

Integer Overflow #30

Closed XiconQoo closed 7 months ago

XiconQoo commented 7 months ago

1x integer overflow attempting to store inf [string "=[C]"]: in function format' [string "@StatWeightsClassic/shared/overlay.lua"]:529: in function?' [string "@StatWeightsClassic/shared/overlay.lua"]:653: in function <StatWeightsClassic/shared/overlay.lua:618> [string "@StatWeightsClassic/shared/overlay.lua"]:821: in function <StatWeightsClassic/shared/overlay.lua:731> [string "@StatWeightsClassic/shared/overlay.lua"]:854: in function <StatWeightsClassic/shared/overlay.lua:829> [string "@StatWeightsClassic/shared/core.lua"]:306: in function <StatWeightsClassic/shared/core.lua:298>

Locals: (temporary) = "%d" (temporary) = Infinite

jezzi23 commented 7 months ago

In order to fix this I'll need your help on how I can reproduce this error. Some information that may help:

You can try /swc reset but you will probably run into this again once you enable expectation overlay again after reset.

XiconQoo commented 7 months ago

I can try to reproduce. Will keep you updated

XiconQoo commented 7 months ago

just happened when using a portal to og out of gnomeregan. Had Rockbiter MH with Way of Earth and Windfury Weapon OH applied.

Also happend when I use Healthstone to OG.

jezzi23 commented 7 months ago

Thanks. This is my theory: frostbrand/flametongue weapon is causing this when Blizzard's UnitAttackSpeed function incorrectly returns 0 for a short time after loading into a new zone for whatever reason. Can't think of anything else that could cause this behavior. I'll throw in a workaround for this in v3.2.22. Feel free to reopen later if that wasn't the fix.

In the meanwhile you could hide the weapon enchantment spells behind a macro without a tooltip so that the overlay error doesn't occur.

XiconQoo commented 7 months ago

In the meanwhile you could hide the weapon enchantment spells behind a macro without a tooltip so that the overlay error doesn't occur.

No idea what you mean by that. How does the tooltip affect this error?

Thanks. This is my theory: frostbrand/flametongue weapon is causing this when Blizzard's UnitAttackSpeed function incorrectly returns 0 for a short time after loading into a new zone for whatever reason. Can't think of anything else that could cause this behavior. I'll throw in a workaround for this in v3.2.22. Feel free to reopen later if that wasn't the fix.

Will try, thanks

jezzi23 commented 7 months ago

In the meanwhile you could hide the weapon enchantment spells behind a macro without a tooltip so that the overlay error doesn't occur.

No idea what you mean by that. How does the tooltip affect this error?

Thanks. This is my theory: frostbrand/flametongue weapon is causing this when Blizzard's UnitAttackSpeed function incorrectly returns 0 for a short time after loading into a new zone for whatever reason. Can't think of anything else that could cause this behavior. I'll throw in a workaround for this in v3.2.22. Feel free to reopen later if that wasn't the fix.

Will try, thanks

That way it won't recognize the spell inside the action button as something try to calculate and draw an overlay for which is the cause of the error. Anyway, it'll be fixed in the next patch.