Lethay / TalentedClassic

WoW addon. A replacement to the default talent UI that allows creation of templates and viewing of all trees at once.
7 stars 19 forks source link

Error on Load #36

Open roweboy1974 opened 4 years ago

roweboy1974 commented 4 years ago

In Issue 32 it was mentioned that someone deleted the storage/config files. Which file(s) are the ones to delete?

https://github.com/Lethay/TalentedClassic/issues/32

Thank you!

Lethay commented 4 years ago

(WoW install location)/_classic/WTF/Account/(account name)/SavedVariables/Talented.lua

roweboy1974 commented 4 years ago

I deleted that but it still happens. I still get the error when trying to open the talent window if I don't first reload.

Lethay commented 4 years ago

Your situation gets ever more perplexing. Sorry if this is a stupid question, but did you delete it whilst WoW was closed? Otherwise, the game regenerates the file when you /reloadui or logout.

roweboy1974 commented 4 years ago

Yes, WoW was closed at the time.

roweboy1974 commented 4 years ago

Also, I loaded it with no other addons loaded and am getting the below error. I'm on my hunter at this time and my added is the latest release version v191112. I downloaded the beta v191206 and didn't get the error but got the same behavior. No window until I reload. Well, sometimes I get the top of the frame with just the "Actions", "Template" and "X" buttons. But that really has happened since the beginning. The other issue of saving templates seems to have stopped some time back as long as I import, log out, log into another toon and then back into the first toon.

Talented: Talented_Data is outdated. It was created for "1.13.2 - 32089 - Oct 4 2019 - 11302", but current build is "1.13.3 - 32790 - Dec 9 2019 - 11303". Please update. Talented: Talented cannot perform the required action because it does not have the required talent data available for class PRIEST. Talented: You must enable the Talented_Data helper addon for this action to work.

roweboy1974 commented 4 years ago

Kept disabling addons until it stopped: Accountant Classic, Allie's Quest Tracker, Atlas, Masque, Bartender 4, Deadly Boss Mods, Elkano's Buffbars, Gathermate 2, HandyNotes, Minimap Button Frame, NeatPlates, Prat 3.0, Questie, Recipe Radar Classic, Recount, Skillet Classic,

Everything seems to be pointing at line 455 in Core.lua:

Date: 2019-12-11 12:15:48 ID: 1 Error occured in: Global Count: 1 Message: ..\AddOns\Talented\core.lua line 455: assertion failed! Debug:

Talented\core.lua:455: LoadTemplates() Talented\core.lua:81: Talented\core.lua:78 (tail call): ?

  [string "safecall Dispatcher[1]"]:5

(tail call): ? ...s\Skillet-Classic\Libs\AceAddon-3.0\AceAddon-3.0.lua:529: InitializeAddon() ...s\Skillet-Classic\Libs\AceAddon-3.0\AceAddon-3.0.lua:644: ...s\Skillet-Classic\Libs\AceAddon-3.0\AceAddon-3.0.lua:636

Date: 2019-12-11 11:48:15 ID: 2 Error occured in: Global Count: 1 Message: ..\AddOns\Talented\core.lua line 455: assertion failed! Debug: (tail call): ?

Talented\core.lua:455: LoadTemplates() Talented\core.lua:81: Talented\core.lua:78

...ccountant_Classic\Libs\AceAddon-3.0\AceAddon-3.0.lua:70: ...ccountant_Classic\Libs\AceAddon-3.0\AceAddon-3.0.lua:65 ...ccountant_Classic\Libs\AceAddon-3.0\AceAddon-3.0.lua:498: InitializeAddon() ...ccountant_Classic\Libs\AceAddon-3.0\AceAddon-3.0.lua:613: ...ccountant_Classic\Libs\AceAddon-3.0\AceAddon-3.0.lua:605

Itself even complains about itself concerning line 455: Date: 2019-12-11 12:17:24 ID: 1 Error occured in: Global Count: 1 Message: ..\AddOns\Talented\core.lua line 455: assertion failed! Debug:

Talented\core.lua:455: LoadTemplates() Talented\core.lua:81: Talented\core.lua:78 (tail call): ?

  [string "safecall Dispatcher[1]"]:5

(tail call): ? ...e\AddOns\Talented\Libs\AceAddon-3.0\AceAddon-3.0.lua:529: InitializeAddon() ...e\AddOns\Talented\Libs\AceAddon-3.0\AceAddon-3.0.lua:644: ...e\AddOns\Talented\Libs\AceAddon-3.0\AceAddon-3.0.lua:636

Once I stopped getting errors about other addons from Talented and tried to open the window I got this error and no window. Once I reloaded the previous line 455 error came up but the window loaded. Date: 2019-12-11 12:18:57 ID: 2 Error occured in: Global Count: 1 Message: ..\AddOns\Talented\encode.lua line 166: attempt to index field '?' (a nil value) Debug: Talented\encode.lua:166: StringToTemplate() Talented\encode.lua:260: UnpackTemplate() Talented\encode.lua:266: CopyPackedTemplate() Talented\core.lua:42: MakeTarget() Talented\core.lua:268: SetTemplate() Talented\core.lua:357: Update() Talented\core.lua:346: Talented\core.lua:343 (tail call): ?

  [string "TOGGLETALENTS"]:1

Locals: self =

{ CreateTemplateMenu = defined @Interface\AddOns\Talented\ui\menu.lua:65 defaults =
{ } LoadAddOn = defined @Interface\AddOns\Talented\core.lua:74 OpenOptionsFrame = defined @Interface\AddOns\Talented\ui\menu.lua:26 MakeArrow = defined @Interface\AddOns\Talented\ui\arrows.lua:17 GetTalentPrereqs = defined @Interface\AddOns\Talented\spell.lua:234 spelldata =
{ } UnregisterComm = defined @Interface\AddOns\Armory\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:153 HideTooltipInfo = defined @Interface\AddOns\Talented\tips.lua:134 DataAddonLoaded = defined @Interface\AddOns\Talented\talents.lua:151 GetDefaultMode = defined @Interface\AddOns\Talented\core.lua:283 SetDefaultModulePrototype = defined @Interface\AddOns\Talented\Libs\AceAddon-3.0\AceAddon-3.0.lua:440 UpdateTemplateName = defined @Interface\AddOns\Talented\core.lua:123 LoadTemplates = defined @Interface\AddOns\Talented\core.lua:445 GetMode = defined @Interface\AddOns\Talented\core.lua:54 SetTemplate = defined @Interface\AddOns\Talented\core.lua:262 SetMode = defined @Interface\AddOns\Talented\core.lua:58 RegisterMessage = defined @Interface\AddOns\Armory\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:90 UnregisterMessage = defined @Interface\AddOns\Armory\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:153 Update = defined @Interface\AddOns\Talented\core.lua:353 hooks =
{ } SendCommMessage = defined @Interface\AddOns\Armory\Libs\AceComm-3.0\AceComm-3.0.lua:87 db =
{ } UnregisterAllComm = defined @Interface\AddOns\Armory\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:174 SetEnabledState = defined @Interface\AddOns\Talented\Libs\AceAddon-3.0\AceAddon-3.0.lua:455 Hook = defined @Interface\AddOns\Talented\Libs\AceHook-3.0\AceHook-3.0.lua:274 OpenTemplate = defined @Interface\AddOns\Talented\core.lua:243 OnEnable = defined @Interface\AddOns\Talented\core.lua:287 GetTemplateStringClass = defined @Interface\AddOns\Talented\encode.lua:15 MakeButton = defined @Interface\AddOns\Talented\ui\buttons.lua:75 ImportTemplate = defined @Interface\AddOns\Talented\core.lua:208 Pool =
{ } OnInitialize = defined @Interface\AddOns\Talented\core.lua:78 UnregisterAllEvents = defined @Interface\AddOns\Armory\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:174 base = TalentedFrame { } Deserialize = defined @Interface\AddOns\Talented\Libs\AceSerializer-3.0\AceSerializer-3.0.lua:246 MakeActionMenu = defined @Interface\AddOns\Talented\ui\menu.lua:368 TalentView =
{ } GetName = defined @Interface\AddOns\Talented\Libs\AceAddon-3.0\AceAddon-3.0.lua:310 views =
{ } name = "Talented" UpdateView = defined @Interface\AddOns\Talented\viewmode.lua:90 GetTalentInfo = defined @Interface\AddOns\Talented\talents.lua:195 Disable = defined @Interface\AddOns\Talented\Libs\AceAddon-3.0\AceAddon-3.0.lua:345 GetOption = defined @Interface\AddOns\Talented\options.lua:62 Unhook = defined @Interface\AddOns\Talented\Libs\AceHook-3.0\AceHook-3.0.lua:418 Print = defined @Interface\AddOns\Talented\core.lua:7 UncompressSpellData = defined @Interface\AddOns\Talented\spell.lua:96 SetOption = defined @Interface\AddOns\Talented\options.lua:55 UpdateCurrentTemplate = defined @Interface\AddOns\Talented\viewmode.lua:44 Serialize = defined @Interface\AddOns\Talented\Libs\AceSerializer-3.0\AceSerializer-3.0.lua:122 Debug = defined @Interface\AddOns\Talented\core.lua:15 EnableUI = defined @Interface\AddOns\Talented\ui\base.lua:362 MakeTalentFrame = defined @Interface\AddOns\Talented\ui\trees.lua:99 Regist

roweboy1974 commented 4 years ago

And now I get the 455 error but the window loads but my hunter's talent template won't save. Others save but the hunter template will not show after a reload or relog. I can create it on another class, log off, log into my hunter and it's there. Once I "set as target" then reload/relog it's gone. The only way I can get it to stay is if I create it from scratch. And again, this is ONLY true on the hunter class.

This is the hunter template I am using:

https://classic.wowhead.com/talent-calc/hunter/5000322150511051-150510305/0AEFGhJmmpmmmnRs1BDeGaJ

Lethay commented 3 years ago

Much later, I have identified what I think this problem might have been. I'm not sure if you still care, play, and have the addon, but the latest version might fix it.

Sorry for my absence.

promaori commented 2 years ago

I'm getting this message using the latest available build with my Human Warrior only:

Message: Interface\AddOns\Talented\encode.lua:176: assertion failed!
Time: Sun Jan 16 21:32:17 2022
Count: 1
Stack: Interface\AddOns\Talented\encode.lua:176: assertion failed!
[string "@Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua"]:761: in function <...Ons\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:717>
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "@Interface\AddOns\Talented\encode.lua"]:176: in function `StringToTemplate'
[string "@Interface\AddOns\Talented\encode.lua"]:260: in function `UnpackTemplate'
[string "@Interface\AddOns\Talented\encode.lua"]:266: in function `CopyPackedTemplate'
[string "@Interface\AddOns\Talented\core.lua"]:42: in function `MakeTarget'
[string "@Interface\AddOns\Talented\core.lua"]:270: in function `SetTemplate'
[string "@Interface\AddOns\Talented\core.lua"]:367: in function `Update'
[string "@Interface\AddOns\Talented\core.lua"]:350: in function <Interface\AddOns\Talented\core.lua:347>
[string "=(tail call)"]: ?
[string "=[C]"]: in function `ToggleTalentFrame'
[string "TOGGLETALENTS"]:1: in function <[string "TOGGLETALENTS"]:1>

Locals: errMsg = "Interface\AddOns\Talented\encode.lua:176: assertion failed!"
isBugGrabber = nil
tsmErrMsg = nil
oldModule = nil
private = <table> {
 globalNameTranslation = <table> {
 }
 FormatErrorMessageSection = <function> defined @Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:517
 ErrorHandler = <function> defined @Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:134
 origErrorHandler = <function> defined @Interface\SharedXML\SharedBasicControls.lua:296
 hitInternalError = false
 CreateErrorFrame = <function> defined @Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:536
 num = 0
 SanitizeString = <function> defined @Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:510
 AddonBlockedHandler = <function> defined @Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:502
 GetStackLevelInfo = <function> defined @Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:344
 ParseLocals = <function> defined @Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:396
 ignoreErrors = false
 errorReports = <table> {
 }
 IsTSMAddon = <function> defined @Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:478
 localLinesTemp = <table> {
 }
 GetStackInfo = <function> defined @Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:313
}
MAX_STACK_DEPTH = 50
OLD_TSM_MODULES = <table> {
 1 = "TradeSkillMaster_Accounting"
 2 = "TradeSkillMaster_AuctionDB"
 3 = "TradeSkillMaster_Auctioning"
 4 = "TradeSkillMaster_Crafting"
 5 = "TradeSkillMaster_Destroying"
 6 = "TradeSkillMaster_Mailing"
 7 = "TradeSkillMaster_Shopping"
 8 = "TradeSkillMaster_Vendoring"
 9 = "TradeSkillMaster_Warehousing"
}

Diving into the code:

function Talented:StringToTemplate(code, template, nmap)
    if code == nil or code:len() <= 0 then return end
    nmap = nmap or talented_map

    local index = modf((nmap:find(code:sub(1, 1), nil, true) - 1) / 3) + 1
    assert(index and index <= #classmap, "Unknown class code")

    local class = classmap[index]
    template = template or {}
    template.class = class

    local trees = self:UncompressSpellData(class)
    assert(trees)

    local tab = 1
    local t = wipe(template[tab] or {})
    template[tab] = t

    for i = 2, code:len() do
        local char = code:sub(i, i)
        if char == stop then
            if #t >= #trees[tab].talents then
                tab = tab + 1
                t = wipe(template[tab] or {})
                template[tab] = t
            end
            tab = tab + 1
            t = wipe(template[tab] or {})
            template[tab] = t
        else
            index = nmap:find(char, nil, true) - 1
            if not index then return end
            local b = fmod(index, 6)
            local a = (index - b) / 6

            if #t >= #trees[tab].talents then
                tab = tab + 1
                t = wipe(template[tab] or {})
                template[tab] = t
            end
            t[#t + 1] = a

            if #t < #trees[tab].talents then
                t[#t + 1] = b
            else
                assert(b == 0)     <----- is unhappy here.
            end
        end
    end

    assert(#template <= #trees, "Too many branches")
    do
        for tab, tree in ipairs(trees) do
            local t = template[tab] or {}
            template[tab] = t
            for index = 1, #tree.talents do
                t[index] = t[index] or 0
            end
        end
    end

    return template, class
end
Lethay commented 2 years ago

Looks like it's unhappy that the saved string is too long. Are you playing on SoM or Classic Era?

promaori commented 2 years ago

Looks like it's unhappy that the saved string is too long. Are you playing on SoM or Classic Era?

TBC Classic - haven't experienced this with the same client on my hunter and shaman. I've just logged into every class and can confirm this is only experienced on my human warrior.

Created a brand new orc warrior and it works fine. Brand new human warrior works too. Must be something in my config for this warrior.

Turns out... I had Classic Era templates stored for the warrior. I commented out the assert(b==0) and reloaded the game. The Talented window appeared as intended and after removing the stored templates from Classic and uncommented the else assertion, it loads fine in-game.