tooltip integer overflow
  • got this while trying to mail a stack of 3 [Flask of the Seventh Demon] to my hunter... i added them drag&drop style in the 3rd slot of the mail (first 2 slots were empty)

    probably some values were not updated for the new gold cap and are still using 'small' integers somewhere?
    or..this it triggered by TSM and LibExtraTip just throws up (again)?


    Date: 2016-10-02 20:08:13
    ID: 1
    Error occured in: Global
    Count: 1
    Message: integer overflow attempting to store 3660298482
    Debug:
    [C]: ?
    [C]: format()
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:750: GetMoneyText()
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:791: AddMoneyLine()
    ...ce\AddOns\Auc-Advanced\Libs\TipHelper\nTipHelper.lua:494: AddLine()
    Auc-Advanced\CoreMain.lua:116:
    Auc-Advanced\CoreMain.lua:56
    (tail call): ?
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:115:
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:99
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:171: h()
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:455:
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:451
    [C]: ?
    ...rface\AddOns\TradeSkillMaster\Private\TooltipLib.lua:85:
    ...rface\AddOns\TradeSkillMaster\Private\TooltipLib.lua:82
    [C]: ?
    [C]: ?
    [C]: OnTooltipSetItem()
    Enchantrix\EnxMain.lua:219:
    Enchantrix\EnxMain.lua:215
    (tail call): ?
    [C]: ?
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:412:
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:406
    ...rface\AddOns\TradeSkillMaster\Private\TooltipLib.lua:95:
    ...rface\AddOns\TradeSkillMaster\Private\TooltipLib.lua:93
    [C]: SetSendMailItem()
    ..\FrameXML\MailFrame.lua:1066: UpdateTooltip()
    ..\FrameXML\GameTooltip.lua:243:
    ..\FrameXML\GameTooltip.lua:227
    Locals:

    AddOns:
    Swatter, v7.1.5675 (TasmanianThylacine)
    AckisRecipeList, v7.0.3.8
    AddonUsage, v2.0.9
    AdvancedInterfaceOptions, v1.0.5-6-g9186ec9
    Altoholic, vr171
    Armory, vv13.2.0
    ArmoryGuildBank, vv13.2.0
    AskMrRobot, v45
    AucAdvanced, v7.1.5675 (TasmanianThylacine)
    auccheapsearcher, v20160906
    AucFilterOutlier, v7.1.5675.5459(7.1/embedded)
    AucMatchUndercut, v7.1.5675.5585(7.1/embedded)
    AucScanData, v7.1.5675 (TasmanianThylacine)
    AucStatSales, v7.1.5675.5598(7.1/embedded)
    AucStatTheUndermineJournal, v3.3.0
    AucStatWOWEcon, v7.1.5675.5613(7.1/embedded)
    AucUtilAHWindowControl, v7.1.5675.5575(7.1/embedded)
    AucUtilAppraiser, v7.1.5675.5666(7.1/embedded)
    AucUtilAskPrice, v7.1.5675.5599(7.1/embedded)
    AucUtilAutoMagic, v7.1.5675.5587(7.1/embedded)
    AucUtilCompactUI, v7.1.5675.5629(7.1/embedded)
    AucUtilEasyBuyout, v7.1.5675.5576(7.1/embedded)
    AucUtilFixAH, v7.1.5675 (TasmanianThylacine)
    AucUtilItemSuggest, v7.1.5675.5651(7.1/embedded)
    AucUtilPriceLevel, v7.1.5675.5633(7.1/embedded)
    AucUtilScanButton, v7.1.5675.5631(7.1/embedded)
    AucUtilScanFinish, v7.1.5675.5588(7.1/embedded)
    AucUtilScanProgress, v7.1.5675.4979(7.1/embedded)
    AucUtilScanStart, v7.1.5675.5347(7.1/embedded)
    AucUtilSearchUI, v7.1.5675.5672(7.1/embedded)
    AucUtilSimpleAuction, v7.1.5675.5654(7.1/embedded)
    AucUtilVendMarkup, v7.1.5675.4828(7.1/embedded)
    Babylonian, v5.1.DEV.332(/embedded)
    BadPet, vv1.0.5
    BeanCounter, v7.1.5675 (TasmanianThylacine)
    CanIMogIt, v7.0.3.23-12-gc1ed6c7
    Configator, v5.1.DEV.406(/embedded)
    DataStore, vr59
    DataStoreAchievements, vr42
    DataStoreAgenda, vr23
    DataStoreCharacters, vr36
    DataStoreContainers, vr53
    DataStoreCrafts, vr73
    DataStoreCurrencies, vr31
    DataStoreGarrisons, vr16
    DataStoreInventory, vr46
    DataStoreMails, vr46
    DataStorePets, vr39
    DataStoreQuests, vr36
    DataStoreReputations, vr37
    DataStoreSpells, vr27
    DataStoreStats, vr26
    DataStoreTalents, vr54
    DBMCore, v
    DBMDefaultSkin, v
    DBMGarrisonInvasions, v
    DBMLDB, v
    DBMSpellTimers, v
    DBMStatusBarTimers, v
    DBMVPVEM, v6.99.1
    DebugLib, v5.1.DEV.337(/embedded)
    Enchantrix, v7.1.5675 (TasmanianThylacine)
    GTFO, v4.40.2a
    HandyNotes, vv1.4.9
    HandyNotesLegionTreasures, v1
    HandyNotesTreasureHunter, v1
    HereBeDragons10, v1.12-release-1-g1d09d98
    Informant, v7.1.5675 (TasmanianThylacine)
    LibBabbleBoss30, v
    LibBabbleInventory30, v
    LibExtraTip, v5.12.DEV.412(/embedded)
    LibPeriodicTable31, vv3.3.0.526
    LibSharedMedia30, v3.0-95
    MasterPlan, v0.104
    MasterPlanA, vA
    Pawn, v2.0.14
    Postal, vv3.5.8
    SavedInstances, v7.0.2
    Scrap, v13.3
    ScrapSpotlight, v13.3
    SexyMap, vv7.0.0-2-g319bab6
    SilverDragon, vv3.2.7-3-ge3cae59
    Skada, v1.5-11
    SlideBar, v7.1.5675 (TasmanianThylacine)
    Stubby, v7.1.5675 (TasmanianThylacine)
    TheUndermineJournal, v4.7.20161001
    TipHelper, v5.12.DEV.405(/embedded)
    TomTom, vv70000-1.1.0
    TradeSkillMaster, vv3.6.1
    TradeSkillMasterAccounting, vv3.0.16
    TradeSkillMasterAuctionDB, vv3.1.13
    TradeSkillMasterAuctioning, vv3.0.13
    TradeSkillMasterCrafting, vv3.1.15
    TradeSkillMasterShopping, vv3.3.9
    TransmogTokens, v1.4.4
    WeakAuras, v2.2.1.5-10-g3070583
    BlizRuntimeLib_enUS v7.0.3.70000 <none>
    (ck=c98)

  • It looks like you might have an older DEV (svn) version of LibExtraTip (and a few other auctioneer libraries) instead of the release version.

    The overflow is occurring inside the LUA string library function "format".
    As far as I know, Lua does not have a large integer type: just numbers, strings, and tables.

    The overflow occurred while trying to format the amount of silver, which should be a value between 0 and 99. There could be an order of operations error leading to an incorrect value, but still not a value THAT large.

    I'll see if I can reproduce a large value or an error in that location.
  • I can't reproduce an error with items.
    Negative value input won't cause a problem, and maximum money values won't cause a problem (even 100 million gold values don't cause problems).
  • *facepalm* you're right... found more than one such antiques around... but.. wasnt LibStub supposed to only allow the newest version to load?

    \AddOns\TheUndermineJournal\TheUndermineJournal.toc

    ## Title: The Undermine Journal
    ## Notes: Sat, October 1
    ## OptionalDeps: Auctionator, AuctionLite, LibExtraTip
    ## SavedVariablesPerCharacter: TUJTooltipsHidden
    ## Version: 4.7.20161001
    libs\LibStub.lua
    libs\LibRealmInfo.lua
    libs\LibExtraTip\Load.xml

    \AddOns\TheUndermineJournal\libs\LibExtraTip\LibExtraTip.toc

    ## Interface: 60200
    ## LoadOnDemand: 0
    ##
    ## Version: 5.21f.5566 (SanctimoniousSwamprat)
    ## Revision: $Id: LibExtraTip.toc 391 2015-06-26 23:45:02Z dinesh $
    ## Author: Norganna's AddOns
    ## X-Part-Of: Libraries
    ## X-Category: Library
    ## X-Max-Interface: 60200
    ## X-URL: http://zip.norganna.org/libs/LibExtraTip/
    ## X-Feedback: http://forums.norganna.org
    ##
    ## X-Curse-Packaged-Version: v3.4.11
    ## X-Curse-Project-Name: TradeSkillMaster
    ## X-Curse-Project-ID: tradeskill-master
    ## X-Curse-Repository-ID: wow/tradeskill-master/mainline
  • Libstub is loading the latest available in your addons. Though that copy for TUJ shouldn't be loading.
  • Looking at the r412 source, it's trying to format (math.floor(money / 10000)) into "%d".

    The value it is trying to store is 3660298482, so the original must have been over 36602984820000. This is a bit larger than the stated Max Bid Price of 99999999999.

    3660298482 is also larger than the maximum signed 32bit integer, so I guess that is what format("%d") still uses.

    Still, any AddOn could use LibExtraTip, so GetMoneyText might validly be used for things other than official AH prices; we should probably do something to handle ridiculously large values.
  • ok.. today it happened again, still when using the mailbox and i have made sure that i have the latest version of Auctioneer Suite and of LibExtraTip anywhere ... but the weird old version ID is built into the current LibExtraTip.lua.... i even verified it by downloading manually the file

    http://auctioneeraddon.com/dl/Release/AuctioneerSuite-7.1.5675.zip

    AuctioneerSuite-7.1.5675\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua

    says this:
    LibStub("LibRevision"):Set("$URL: http://svn.norganna.org/libs/trunk/LibExtraTip/LibExtraTip.lua $","$Rev: 412 $","5.15.DEV.", 'auctioneer', 'libs')

    even though the .toc file says it's
    ## Version: 7.1.5675 (TasmanianThylacine)
    ## Revision: $Id: LibExtraTip.toc 408 2016-08-07 22:26:52Z ccox $

    so.. my guess is that the .lua file overrides the version/revision ID from .toc and WoW reports this instead of the .toc declaration



    Same thing happens with Babylonian.lua:
    LibStub("LibRevision"):Set("$URL: http://svn.norganna.org/libs/trunk/Babylonian/Babylonian.lua $","$Rev: 332 $","5.1.DEV.", 'auctioneer', 'libs')

    Configator:
    LibStub("LibRevision"):Set("$URL: http://svn.norganna.org/libs/trunk/Configator/Configator.lua $","$Rev: 406 $","5.1.DEV.", 'auctioneer', 'libs')

    and pretty much ALL libs coming with Auc-advanced.. seems only the .toc file was changed not the actual updated libs themselves



    e.g. current source from fisheye.. still says "5.15.DEV."

    http://fisheye.norganna.org/browse/~br=trunk/Libraries/trunk/LibExtraTip/LibExtraTip.lua?hb=true




    Date: 2016-10-06 11:10:47
    ID: 1
    Error occured in: Global
    Count: 1
    Message: integer overflow attempting to store 33940178276
    Debug:
    [C]: ?
    [C]: format()
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:750: GetMoneyText()
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:791: AddMoneyLine()
    ...ce\AddOns\Auc-Advanced\Libs\TipHelper\nTipHelper.lua:494: AddLine()
    Auc-Advanced\CoreMain.lua:116:
    Auc-Advanced\CoreMain.lua:56
    (tail call): ?
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:115:
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:99
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:171: h()
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:455:
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:451
    [C]: ?
    ...rface\AddOns\TradeSkillMaster\Private\TooltipLib.lua:85:
    ...rface\AddOns\TradeSkillMaster\Private\TooltipLib.lua:82
    [C]: ?
    [C]: ?
    [C]: ?
    ...e\AddOns\HandyNotes\Libs\AceHook-3.0\AceHook-3.0.lua:95:
    ...e\AddOns\HandyNotes\Libs\AceHook-3.0\AceHook-3.0.lua:87
    [C]: ?
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:412:
    ...AddOns\Auc-Advanced\Libs\LibExtraTip\LibExtraTip.lua:406
    ...rface\AddOns\TradeSkillMaster\Private\TooltipLib.lua:95:
    ...rface\AddOns\TradeSkillMaster\Private\TooltipLib.lua:93
    [C]: SetSendMailItem()
    ..\FrameXML\MailFrame.lua:1066: SendMailAttachment_OnEnter()
    [string "*:OnEnter"]:1:
    [string "*:OnEnter"]:1
    Locals:

    AddOns:
    Swatter, v7.1.5675 (TasmanianThylacine)
    AckisRecipeList, v7.0.3.8
    AddonUsage, v2.0.9
    AdvancedInterfaceOptions, v1.0.5-6-g9186ec9
    Altoholic, vr171
    Armory, vv13.2.0
    ArmoryGuildBank, vv13.2.0
    AskMrRobot, v45
    AucAdvanced, v7.1.5675 (TasmanianThylacine)
    auccheapsearcher, v20160906
    AucFilterOutlier, v7.1.5675.5459(7.1/embedded)
    AucMatchUndercut, v7.1.5675.5585(7.1/embedded)
    AucScanData, v7.1.5675 (TasmanianThylacine)
    AucStatSales, v7.1.5675.5598(7.1/embedded)
    AucStatTheUndermineJournal, v3.3.0
    AucStatWOWEcon, v7.1.5675.5613(7.1/embedded)
    AucUtilAHWindowControl, v7.1.5675.5575(7.1/embedded)
    AucUtilAppraiser, v7.1.5675.5666(7.1/embedded)
    AucUtilAskPrice, v7.1.5675.5599(7.1/embedded)
    AucUtilAutoMagic, v7.1.5675.5587(7.1/embedded)
    AucUtilCompactUI, v7.1.5675.5629(7.1/embedded)
    AucUtilEasyBuyout, v7.1.5675.5576(7.1/embedded)
    AucUtilFixAH, v7.1.5675 (TasmanianThylacine)
    AucUtilItemSuggest, v7.1.5675.5651(7.1/embedded)
    AucUtilPriceLevel, v7.1.5675.5633(7.1/embedded)
    AucUtilScanButton, v7.1.5675.5631(7.1/embedded)
    AucUtilScanFinish, v7.1.5675.5588(7.1/embedded)
    AucUtilScanProgress, v7.1.5675.4979(7.1/embedded)
    AucUtilScanStart, v7.1.5675.5347(7.1/embedded)
    AucUtilSearchUI, v7.1.5675.5672(7.1/embedded)
    AucUtilSimpleAuction, v7.1.5675.5654(7.1/embedded)
    AucUtilVendMarkup, v7.1.5675.4828(7.1/embedded)
    Babylonian, v5.1.DEV.332(/embedded)
    BadPet, vv1.0.5
    BeanCounter, v7.1.5675 (TasmanianThylacine)
    CanIMogIt, v7.0.3.23-12-gc1ed6c7
    Configator, v5.1.DEV.406(/embedded)
    DataStore, vr59
    DataStoreAchievements, vr42
    DataStoreAgenda, vr23
    DataStoreCharacters, vr36
    DataStoreContainers, vr53
    DataStoreCrafts, vr73
    DataStoreCurrencies, vr31
    DataStoreGarrisons, vr16
    DataStoreInventory, vr46
    DataStoreMails, vr46
    DataStorePets, vr39
    DataStoreQuests, vr36
    DataStoreReputations, vr37
    DataStoreSpells, vr27
    DataStoreStats, vr26
    DataStoreTalents, vr54
    DBMCore, v
    DBMDefaultSkin, v
    DBMGarrisonInvasions, v
    DBMLDB, v
    DBMSpellTimers, v
    DBMStatusBarTimers, v
    DBMVPVEM, v6.99.1
    DebugLib, v5.1.DEV.337(/embedded)
    GTFO, v4.40.2a
    HandyNotes, vv1.4.9
    HandyNotesLegionTreasures, v1
    HandyNotesTreasureHunter, v1
    HereBeDragons10, v1.12-release-1-g1d09d98
    Informant, v7.1.5675 (TasmanianThylacine)
    LibBabbleBoss30, v
    LibBabbleInventory30, v
    LibExtraTip, v5.12.DEV.412(/embedded)
    LibPeriodicTable31, vv3.3.0.527
    LibSharedMedia30, v3.0-95
    MasterPlan, v0.104
    MasterPlanA, vA
    Pawn, v2.0.14
    Postal, vv3.5.8
    SavedInstances, v7.0.2
    Scrap, v13.3
    ScrapSpotlight, v13.3
    SexyMap, vv7.0.0-2-g319bab6
    SilverDragon, vv3.2.7-3-ge3cae59
    Skada, v1.5-11
    SlideBar, v7.1.5675 (TasmanianThylacine)
    Stubby, v7.1.5675 (TasmanianThylacine)
    TheUndermineJournal, v4.7.20161004
    TipHelper, v5.12.DEV.405(/embedded)
    TomTom, vv70000-1.1.0
    TradeSkillMaster, vv3.6.5
    TradeSkillMasterAccounting, vv3.0.16
    TradeSkillMasterAuctionDB, vv3.1.13
    TradeSkillMasterAuctioning, vv3.0.13
    TradeSkillMasterCrafting, vv3.1.16
    TradeSkillMasterShopping, vv3.4.1
    TransmogTokens, v1.4.4
    WeakAuras, v2.2.1.5-10-g3070583
    BlizRuntimeLib_enUS v7.0.3.70000 <none>
    (ck=c6b)
  • and here are 4 screenshots of all the files that have .DEV. in their contents from my addons folder:
    https://imgur.com/a/f1vzR
  • Yes, r412 is the version included in the current release. Later Dev versions haven't changed this bit of code though, so will still have the same problem.

    Embedded libs have always had that .DEV tag in their version strings, mainly because their .TOC files are not used (and I think are inaccessible from the API). Note that Stubby and SlideBar have proper versions, because they are not embedded.

    Anyway, I think the simple fix is to find the offending format string, at line 91
    local goldicon = "%d|T"..iconpath.."GoldIcon:0|t"
    and change %d to %.0f (i.e. floating point with 0 decimal places)
    local goldicon = "%.0f|T"..iconpath.."GoldIcon:0|t"
  • It still needs to be reported to Blizzard so they can fix the string library code.
    floating point format may bypass the problem, but could also create other problems with large values.
    Pinning the input amount to a reasonable value would work, but that limit would have be updated whenever Blizzard increases the per-character gold limit.
  • Yes, "%.0f" hits a limit around 1e+16, where it starts to lose accuracy - presumably due to the internal fp representation.

    We shouldn't cap values for this function. We should probably do an approximation after a certain point, or points, i.e. 111111k, 111111m, whatever (and if we do that, we should not display silver/copper values, as they become irrelevant).
  • I've applied the simple fix above as a temporary fix for the time being.
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

privacy
norganna's addons network · tf2 warehouse · scrap warehouse · auctioneer addon · gatherer addon · addon forums · rdrct