Division by zero on ptr 4.3 #16


  • New
  • Defect
Open
Assigned to whitetooth3
  • Samnthar created this issue Oct 1, 2011

    If i hover over a enchant in combatlog or open the character frame i get:

    Message: ..\AddOns\Outfitter\LibStatLogic-1.2.lua line 10283:
       Division by zero
    Debug:
       [C]: ?
       Outfitter\LibStatLogic-1.2.lua:10283: GetAvoidanceAfterDR()
       Outfitter\LibStatLogic-1.2.lua:10161: GetDodgeChanceBeforeDR()
       Outfitter\LibStatLogic-1.2.lua:10313: GetAvoidanceGainAfterDR()
       RatingBuster\RatingBuster.lua:3803: func()
       RatingBuster\RatingBuster.lua:4383: StatSummary()
       RatingBuster\RatingBuster.lua:2717: handler()
       ...ingBuster\libs\LibTipHooker-1.1\LibTipHooker-1.1.lua:179:
          ...ingBuster\libs\LibTipHooker-1.1\LibTipHooker-1.1.lua:174
       [C]: Outfitter_OrigSetHyperlink()
       Outfitter\Outfitter.lua:7564: SetHyperlink()
       Chatter\Modules\LinkHover.lua:39: ?()
       Ace3\AceHook-3.0\AceHook-3.0.lua:90:
          Ace3\AceHook-3.0\AceHook-3.0.lua:87

  • Samnthar added the tags New Defect Oct 1, 2011
  • _ForgeUser381269 posted a comment Nov 13, 2011

    Same error:

    Message: ...ingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:10283 Division by zero
    Time: 11/13/11 21:51:53
    Count: 9
    Stack: ...ingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:10283 in function `GetAvoidanceAfterDR'
    ...ingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:10198 in function `GetParryChanceBeforeDR'
    ...ingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:10308 in function `GetAvoidanceGainAfterDR'
    Interface\AddOns\RatingBuster\RatingBuster.lua:2791 in function <Interface\AddOns\RatingBuster\RatingBuster.lua:2760
    (tail call): ?
    Interface\AddOns\RatingBuster\RatingBuster.lua:2749 in function `SplitDoJoin'
    Interface\AddOns\RatingBuster\RatingBuster.lua:2628 in function `handler'
    ...ingBuster\libs\LibTipHooker-1.1\LibTipHooker-1.1.lua:179 in function <...ingBuster\libs\LibTipHooker-1.1\LibTipHooker-1.1.lua:174
    [C]: in function `SetMerchantItem'
    Interface\AddOns\+Wowhead_Looter\Wowhead_Looter.lua:718 in function `wlEvent_MERCHANT_UPDATE'
    Interface\AddOns\+Wowhead_Looter\Wowhead_Looter.lua:688 in function `?'
    Interface\AddOns\+Wowhead_Looter\Wowhead_Looter.lua:2958 in function <Interface\AddOns\+Wowhead_Looter\Wowhead_Looter.lua:2956

    Locals: self = <table> {
     GetRAPFromAgi = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:11036
     StatModTable = <table> {
     }
     SetTip = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:87
     ItemSetFrame = StatLogicItemSetFrame {
     }
     SpellSchools = <table> {
     }
     RemoveEnchant = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:11833
     BuildGemmedTooltip = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:12020
     GetGemID = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:12107
     GetSum = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:12291
     GetStanceIcon = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:6340
     GetDodgeChanceBeforeDR = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:10144
     GetAvoidanceAfterDR = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:10263
     RemoveGem = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:11854
     GetStatMod = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:9882
     wowBuildNo = 14980
     PlayerHasAura = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:6348
     tip = LibStatLogic-1.2Tooltip {
     }
     RemoveEnchantGem = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:11953
     PlayerHasItemSet = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:6416
     GetEffectFromDefense = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:10402
     ModEnchantGem = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:11979
     GetFinalArmor = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:12760
     GetClassIdOrName = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:6123
     GetAPFromAgi = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:10959
     GetNormalManaRegenFromSpi = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:11701
     GetSpellCritFromInt = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:11569
     GetHealthFromSta = <function> defined @Interface\AddOns\RatingBuster\libs\LibStatLogic-1.2\LibStatLogic-1.2.lua:11424
     GetStatNameFromID = <function> defined @Interface\AddOns\Rat

  • _ForgeUser581183 posted a comment Aug 10, 2012

    Unit test that fails:

        testGetAvoidanceAfterDR = function()
                --[[
                    avoidanceAfterDR = GetAvoidanceAfterDR(avoidanceType, avoidanceBeforeDR[, class])
    
                    avoidanceType:  "DODGE", "PARRY", "MELEE_HIT_AVOID"
                    avoidanceBeforeDR: let's use 0, since that's what http://www.wowace.com/addons/libstatlogic-1-2/tickets/16-division-by-zero-on-ptr-4-3/ is experiencing
                    class: was "6" a guy said
                --]]
                local n;
    
                n = StatLogic:GetAvoidanceAfterDR("DODGE", 0, 6);
                n = StatLogic:GetAvoidanceAfterDR("PARRY", 0, 6);
        end;
    
  • _ForgeUser581183 posted a comment Aug 10, 2012

    This should hopefully be fixed in r81.

  • Sygon_Paul posted a comment Aug 19, 2012

    This is on the MoP beta, using r86 of LibStaticLogic. Caught by BugSack.

    21x LibStatLogic-1.2\LibStatLogic-1.2-86.lua:5721: Division by zero
    LibStatLogic-1.2\LibStatLogic-1.2-86.lua:5721: in function "GetEffectFromRating"
    TankPoints\TankPoints-r172.lua:1625: in function "CalculateTankPoints"
    TankPoints\TankPoints-r172.lua:1923: in function "GetTankPoints"
    TankPoints\TankPoints-r172.lua:493: in function "UpdateDataTable"
    TankPoints\TankPoints-r172.lua:456: in function <TankPoints\TankPoints.lua:446>
    (tail call): ?
    <in C code>
    <string>:"safecall Dispatcher[1]":9: in function <string>:"safecall Dispatcher[1]":5
    (tail call): ?
    Ace3-r1057\AceAddon-3.0\AceAddon-3.0-11.lua:543: in function "EnableAddon"
    Ace3-r1057\AceAddon-3.0\AceAddon-3.0-11.lua:636: in function <Ace3\AceAddon-3.0\AceAddon-3.0.lua:621>
    <in C code>
    AceAddon-3.0\AceAddon-3.0-11.lua:543: in function "EnableAddon"
    Ace3-r1057\AceAddon-3.0\AceAddon-3.0-11.lua:636: in function <Ace3\AceAddon-3.0\AceAddon-3.0.lua:621>
    <in C code>
    FrameXML\UIParent.lua:299: in function "UIParentLoadAddOn"
    FrameXML\UIParent.lua:322: in function "CombatLog_LoadUI"
    FrameXML\UIParent.lua:692: in function <FrameXML\UIParent.lua:657>
    
    Locals:
    nil
    
  • _ForgeUser581183 posted a comment Aug 20, 2012

    @myrroddin This bug in r86 should be fixed in r87. It's a different bug (i.e. in a different spot).

    • Resilience no longer affects critical strikes against you,
      and i added a dummy combat rating value for "PVP Power" so it wouldn't divide by zero.

    • For anything else, the extra checks i added should help pinpoint the problem (by telling me combat rating and class that the calculation is being performed for)


    Edited Aug 20, 2012

To post a comment, please login or register a new account.