[Patch] itemName is nil in SearcherGeneral.lua
  • residentresident July 2010
    When using the SearchUI to scan for Frostweave Cloth, it raised an exception in SearcherGeneral.lua in the "private.NameSearch" function complaining that itemName was nil on line 230:


    function private.NameSearch(nametype,itemName)

    -- etc --

    -- Lowercase the input
    name = name:lower()
    itemName = itemName:lower()


    I'm not super sure what's happend, but this is pretty clearly a precondition violation, so I patched it as follows:


    function private.NameSearch(nametype,itemName)

    -- etc --

    -- HACK: If there's no itemName, then this doesn't match.
    if not itemName then
    private.debug = nametype.." skipped because itemName is nil"
    return false
    end

    -- Lowercase the input
    name = name:lower()
    itemName = itemName:lower()


    I'll admit that I fixed this in the laziest way possible. I'm not a LUA developer by trade (C# actually), and I didn't bother to investigate itemName or why it was nil. I'm casually familiar with addon development, so here's some version information that may be helpful -- WoW 3.3.5 (12340 OSX client), and here's the top of Auc-Advanced.toc


    ## Title: Auc-Auctioneer |cff774422(core)
    ## Notes: Auctioneer assists players to track item values; whether buying or selling. You must enable at least one statistics extension (like Auc:Stats:Simple) to begin. Combines with other modules to form the powerful, fully configurable Auctioneer Suite.
    ##
    ## Interface: 30300
    ## LoadOnDemand: 0
    ## Dependencies: Stubby
    ## OptionalDependencies: !nLog, SlideBar, Configator, Babylonian, DebugLib, TipHelper, LibExtraTip
    ## SavedVariables: AucAdvancedConfig, AucAdvancedData
    ## SavedVariablesPerCharacter: AucAdvancedLocal
    ##
    ## Version: 5.8.4723 (CreepyKangaroo)
    ## Revision: $Id: Auc-Advanced.toc 4566 2009-12-08 14:43:28Z Nechckn $
    ## URL: <a href="http://auctioneeraddon.com/" target="_blank" rel="nofollow">http://auctioneeraddon.com/</a>
    ## Author: Norganna's AddOns
    ## X-Part-Of: Auctioneer
    ##


    I apologize if I posted this in the wrong forum. I would've just posted to JIRA, but I read some post about not doing that.

    ~resident
  • brykrysbrykrys July 2010
    Core Developer
    If you could copy and paste the whole error here from Swatter, it may help track down where the nil came from.
Privacy · Advertising
Norganna's AddOns Network · World Of Minecraft · WoM Realms · Auctioneer Addon · Gatherer Addon · Addon Forums · RDRCT