Bugs in 'invested' calculation. #57


  • New
  • Defect
Open
Assigned to _ForgeUser977559
  • _ForgeUser3243153 created this issue May 31, 2011

    What steps will reproduce the problem?
    1. Craft something (i.e. a cut gem - Bold Inferno Ruby)

    What is the expected output? What do you see instead?
    The 'invested per each' Bold Inferno Ruby before craft was for example 100g, it should not change assuming you used uncut Inferno Ruby, which costs 100g, yet it does change (addon adds this 100g in 'invested per each' instead of adding it to 'totally invested'.

    What version of the product are you using?
    Latest WowAce version

  • _ForgeUser3243153 added the tags New Defect May 31, 2011
  • _ForgeUser977559 posted a comment May 31, 2011

    I'm not sure I completely understand the situation. You had inferno rubies with 100g each invested and you already had bold with 100g invested each, but when you cut more the invested each changed? Did it go up our down? How much did it change?

  • _ForgeUser3243153 posted a comment May 31, 2011

    Yes, invested per each Bold Inferno Ruby (cut gem) went from 100g to something like 202g (I would account those odd 2g on posting fees) , but should be more like 102g, because uncut gem costs 100g.

    However, something interesting happened, as when I closed the game and lunched it again afterwards, the invested per each remained at 100g. Can't really explain that, but will investigate more.

    This is a nuisance because I use ItemAuditor's invested per each parameter to calculate my posting thresholds in TradeSkillMaster ( the addon is capable of using ItemAuditor's data). When invested each is changed this way (from 100g to 200g) The addon won't post obviously, because the threshold is way above market prices.

    Edit: Hmm, I can't seem to reproduce this now... maybe it was just a random glitch?

    But I will report something more. Sometimes when I type in /ia invested, I get an empty "invested" window, and my chat is spammed by the addon in gray-ish font, saying something about "nil" "id" and "fail" (sorry that I can't recall the exact message now...).

    Edit 2: now I got an actual error prompt:

    Quote:

    Date: 2011-05-31 21:07:41
    ID: 1
    Error occured in: Global
    Count: 1
    Message: ...rface\AddOns\ItemAuditor\Modules\DisplayInvested.lua line 195:
    Invalid ItemID. Something may be wrong in the inventory scanner.
    Debug:
    (tail call): ?
    [C]: assert()
    ...rface\AddOns\ItemAuditor\Modules\DisplayInvested.lua:195: UpdateInvestedData()
    ...rface\AddOns\ItemAuditor\Modules\DisplayInvested.lua:154: cb()
    ItemAuditor\Modules\Frames.lua:29:
    ItemAuditor\Modules\Frames.lua:14
    (tail call): ?
    [C]: ?
    [string "safecall Dispatcher[3]"]:9:
    [string "safecall Dispatcher[3]"]:5
    (tail call): ?
    Ace3\AceGUI-3.0\AceGUI-3.0.lua:314: Fire()
    ...Ace3\AceGUI-3.0\widgets\AceGUIContainer-TabGroup.lua:167: SelectTab()
    ItemAuditor\Modules\Frames.lua:78: CreateFrame()
    ItemAuditor\Modules\Frames.lua:97: CreateFrame()
    ...rface\AddOns\ItemAuditor\Modules\DisplayInvested.lua:161:
    ...rface\AddOns\ItemAuditor\Modules\DisplayInvested.lua:160
    (tail call): ?
    ...\AceConfig-3.0\AceConfigCmd-3.0\AceConfigCmd-3.0.lua:143:
    ...\AceConfig-3.0\AceConfigCmd-3.0\AceConfigCmd-3.0.lua:133
    ...\AceConfig-3.0\AceConfigCmd-3.0\AceConfigCmd-3.0.lua:408:
    ...\AceConfig-3.0\AceConfigCmd-3.0\AceConfigCmd-3.0.lua:334
    (tail call): ?
    ...\AceConfig-3.0\AceConfigCmd-3.0\AceConfigCmd-3.0.lua:762: HandleCommand()
    ...\AceConfig-3.0\AceConfigCmd-3.0\AceConfigCmd-3.0.lua:774: value()
    ..\FrameXML\ChatFrame.lua:4242: ChatEdit_ParseText()
    ..\FrameXML\ChatFrame.lua:3832: ChatEdit_SendText()
    ..\FrameXML\ChatFrame.lua:3870: ChatEdit_OnEnterPressed()
    [string "*:OnEnterPressed"]:1:
    [string "*:OnEnterPressed"]:1
    [C]: ?

    Edit 3: Sometimes I get this error spammed into chat frame:
    "ItemAuditor: GetItemInfo failed to return an item link for nil (ID: 7). Retrying in 1 second."

    and sometimes the above error prompt appears. Reloading UI resolves this problem temporarily.

    Edit 4 (sorry for so many edits, this will be my last in this post): Now I got this "invested" bug going on again. It seems like the addon tends to forget 'invested each' data and calculates it by dividing invested total by the ammount of items currently in my inventory. Plus it slows the game heavily sometimes when I craft. I guess this would require some major work to get fixed, and since you can't spare much time to develop this addon I won't bother you more I think. But I'm thankful for your reaction.


    Edited May 31, 2011
  • _ForgeUser977559 posted a comment Jun 2, 2011

    ItemAuditor is designed to only keep track of the total invested and divide that by the number you have at any given time. It should be keeping track of banks/mail/auctions in addition to your bags. This also means that for ItemAuditor to reliably keep track of everything, it needs to be enabled on all characters at all times. If you have one character using IA craft 2 items and send it to another character with IA (and Altoholic) disabled, it won't see that item in your inventory and your invested each will effectively double.

    "ItemAuditor: GetItemInfo failed to return an item link for nil (ID: 7). Retrying in 1 second." This does indicate that something got recorded as having an ItemID of 7, but that doesn't exist. Unfortunately with the release of 4.0 Blizzard made some changes that made GetItemInfo less reliable. Due to those changes ItemAuditor is unable to determine if it failed to get data because the ID is bad (7 is an invalid ID) or if Blizzard is simply failing to return the proper info. My best solution was to simply retry a few times and give up if it fails 3 times in a row. This is the same reason you occasionally get an empty invested window. One option would be to examine World of Warcraft\WTF\Account\{your_account}\SavedVariables\ItemAuditor.lua while WoW is shut down. If you find that is is storing info for Item 7, delete the lines and start WoW. This is what it would look like, but the count and invested rows might have other numbers.

    ["item:7"] = {
        ["count"] = 0,
        ["invested"] = 0,
    },
    

    Because of what this addon does, I don't believe it's possible to make it not slow down the game when you craft. Crafting works by scanning your inventory, and then when it changes it scans again to find the differences. Items that have disappeared have their costs removed and added to any items that appear. It can slow down the game, but it also makes it powerful enough to work when converting items, like essences, and not just things that use the tradeskill window.


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