49 - Error on Load in WoW 4.0.1

BugSack is catching the following error from SexyCooldown whenever I login to WoW 4.0.1.


1x SexyCooldown-0.6.16\Modules\Spells.lua:15 attempt to index a nil value
SexyCooldown-0.6.16\Modules\Spells.lua:156 in function `CacheSpells'
SexyCooldown-0.6.16\Modules\Spells.lua:57 in function <SexyCooldown\Modules\Spells.lua:56
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[1]":9: in function <[string "safecall Dispatcher[1]"]:5>
(tail call): ?:
AceAddon-3.0-5 (Aloft):539: in function `EnableAddon'
AceAddon-3.0-5 (Aloft):551: in function `EnableAddon'
AceAddon-3.0-5 (Aloft):629: in function <...face\AddOns\Aloft\Libs\AceAddon-3.0\AceAddon-3.0.lua:615
<in C code>: in function `LoadAddOn'
PitBull4-v4.0.0-beta12-1-gef7174e\Main.lua:1136 in function `LoadModules'
PitBull4-v4.0.0-beta12-1-gef7174e\Main.lua:1248 in function `OnProfileChanged'
PitBull4-v4.0.0-beta12-1-gef7174e\Main.lua:1315 in function <PitBull4\Main.lua:1285
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[1]":9: in function <[string "safecall Dispatcher[1]"]:5>
(tail call): ?:
AceAddon-3.0-5 (Aloft):539: in function `EnableAddon'
AceAddon-3.0-5 (Aloft):629: in function <...face\AddOns\Aloft\Libs\AceAddon-3.0\AceAddon-3.0.lua:615
<in C code>: in function `LoadAddOn'
Interface\FrameXML\UIParent.lua:242 in function `UIParentLoadAddOn':
Interface\FrameXML\UIParent.lua:265 in function `CombatLog_LoadUI':
Interface\FrameXML\UIParent.lua:519 in function <Interface\FrameXML\UIParent.lua:492


User When Change
saltorio Oct 13, 2010 at 05:08 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of icewindzg icewindzg Dec 03, 2010 at 15:51 UTC - 0 likes

    I do hope I have this right, I have been trying to cross-reference effects, but I cannot guarantee this will work.  For the RaidDebuffs.lua file this *should* be able to be copy-pasted.  Back up your stuff before you do anything I suggest.

            94009,        -- Rend
            12867,        -- Deep Wounds
            703,            -- Garrote
            1943,        -- Rupture
            33745,        -- Lacerate
            9005,        -- Pounce
            1079,        -- Rip
            1822,        -- Rake
            7386,        -- Sunder Armor
            8647,        -- Expose Armor
            770,            -- Faerie Fire
            50498,        -- Tear Armor
            35387,        -- Corrosive Spit
            80390,        -- Mortal Strike
            10918,        -- Wound Poison
            12569,        -- Permafrost
            15313,        -- Improved Mind Blast
            54680,        -- Monstrous Bite
            30213,        -- Legion Strike
            46910,        -- Furious Attacks
            82654,        -- Widow Venom

    If I'm wrong, let me know.  Posting after 28 hours without sleep can get ugly.

  • Avatar of Ninix_ Ninix_ Oct 20, 2010 at 06:33 UTC - 0 likes

    I posted this over at the Curse download site. Following the instructions below exactly as written should get the addon working again. This is of course a temporary hack/patch to get it working again while we wait for an official update. You will still need to check Load Out of Date addons.

    Please do this with a fresh copy downloaded from Curse or WoWAce. If you've already made modifications to the code, revert to a fresh copy before applying these changes.


    Was able to fix spell cooldowns, however in doing so I had to neuter the debuff display functionality by ripping out a bunch of spell IDs that no longer exist.

    Here's how you can fix it yourself:

    1) Extract SexyCooldown onto your desktop. Do not extract it to the WoW\Interface\Addons folder yet because we cannot easily edit them from there on Vista/Windows 7.

    2) Open up Spells.lua (it's in the Modules folder) in Notepad. You will have to click on the drop down that says Text Documents (*.txt) and select All Files first to get Notepad to display .lua files.

    3) Look for GetSpellName, it's around 10 lines from the top. Change that to GetSpellBookItemName. (Renaming such a frequently used function... nice one Blizzard).

    4) The line right after that is "if not name then break end". After THAT line, paste the following.

    if (GetSpellLink(i, book)) then

    5) A few lines after that is an "end". Stick another one right after that so you have "end end".

    6) Open up the file Modules\RaidDebuffs.lua. Remove everything between the brackets for RAID_DEBUFF_BLEED, RAID_DEBUFF_MAJOR_ARMOR, RAID_DEBUFF_SPELL_HIT, RAID_DEBUFF_MORTAL_STRIKE. Don't remove the actual headers or the brackets, just the list of numbers inside of them. This will kill SexyCooldown's ability to monitor those debuffs.

    7) Save those two files. Move the SexyCooldown folder you extracted on your desktop to its usual location in the Addons folder.

    After doing this, SexyCooldowns should work fine. I haven't tested it much but it seemed to recognize the few spells I tried, including new spells. Don't know yet about items or other non-spell cooldowns.

    Last edited Oct 20, 2010 by Ninix_
  • Avatar of Mental211 Mental211 Oct 19, 2010 at 10:15 UTC - 0 likes

    I'm getting this error when logging in, together with the spellbook error whenever I log-in: Getting really annoying as I really love this addon.

    Message: ...nterface\AddOns\SexyCooldown\Modules\RaidDebuffs.lua:61: attempt to concatenate local 'icon' (a nil value)
    Time: 10/19/10 12:10:16
    Count: 1
    Stack: ...nterface\AddOns\SexyCooldown\Modules\RaidDebuffs.lua:61: in function <...nterface\AddOns\SexyCooldown\Modules\RaidDebuffs.lua:44>
    (tail call): ?
    [C]: ?
    [string "safecall Dispatcher[1]"]:9: in function <[string "safecall Dispatcher[1]"]:5>
    (tail call): ?
    Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:510: in function `InitializeAddon'
    Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:622: in function <Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:615>
    Locals: self = <table> {
     SetDefaultModuleLibraries = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:381
     Enable = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:313
     UnregisterAllEvents = <function> defined @Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:202
     EnableModule = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:346
     modules = <table> {
     GetModule = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:230
     IterateEmbeds = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:456
     defaultModuleLibraries = <table> {
     GetName = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:298
     name = "SexyCooldown_Raid Debuffs"
     IsEnabled = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:465
     DisableModule = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:364
     UpdateUnit = <function> defined @Interface\AddOns\SexyCooldown\Modules\RaidDebuffs.lua:93
     RegisterMessage = <function> defined @Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:118
     UnregisterBucket = <function> defined @Interface\AddOns\Ace3\AceBucket-3.0\AceBucket-3.0.lua:235
     RegisterBucketEvent = <function> defined @Interface\AddOns\Ace3\AceBucket-3.0\AceBucket-3.0.lua:213
     baseName = "SexyCooldown"
     IsModule = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:237
     Refresh = <function> defined @Interface\AddOns\SexyCooldown\Modules\RaidDebuffs.lua:72
     SendMessage = <function> defined @Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:87
     UNIT_AURA = <function> defined @Interface\AddOns\SexyCooldown\Modules\RaidDebuffs.lua:81
     OnEnable = <function> defined @Interface\AddOns\SexyCooldown\Modules\RaidDebuffs.lua:66
     SetEnabledState = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:438
     UnregisterAllBuckets = <function> defined @Interface\AddOns\Ace3\AceBucket-3.0\AceBucket-3.0.lua:258
     enabledState = true
     OnInitialize = <function> defined @Interface\AddOns\SexyCooldown\Modules\RaidDebuffs.lua:44
     RegisterEvent = <function> defined @Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:118
     UnregisterAllMessages = <function> defined @Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:202
     UnregisterMessage = <function> defined @Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:181
     RegisterBucketMessage = <function> defined @Interface\AddOns\Ace3\AceBucket-3.0\AceBucket-3.0.lua:229
     NewModule = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:255
     IterateModules = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:451
     SetDefaultModuleState = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:401
     SetDefaultModulePrototype = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:423
     defaultModuleState = true
     moduleName = "Raid Debuffs"
     UnregisterEvent = <function> defined @Interface\AddOns\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:181
     Disable = <function> defined @Interface\AddOns\Ace3\AceAddon-3.0\AceAddon-3.0.lua:328
    (for generator) = <function> defined =[C]:-1
    (for state) = <table> {
     RAID_DEBUFF_BLEED = <table> {
  • Avatar of Rokiyo Rokiyo Oct 19, 2010 at 06:48 UTC - 0 likes

    I was only getting this error on my Mage when my Frost Elemental was out, as GetSpellLink() was returning nil for the pet's "Attack" ability.

    Roncil's fix works perfectly, except that

    if spellLink ~= nil then


    if spellLink then

    do exactly the same thing. There's no need to explicitly make a boolean comparison.

    MarkParish: In your ..\World of Warcraft\Interface\AddOns\SexyCooldown\Modules folder you will find Spells.lua

    The function cacheSpellsForBook(t, book) starts on line 9.

  • Avatar of MarkParish MarkParish Oct 16, 2010 at 03:00 UTC - 0 likes

    I'll learn to type one of these days, I mean where is the code located?

  • Avatar of MarkParish MarkParish Oct 16, 2010 at 02:59 UTC - 0 likes


    When is this going to be corrected and is this code located?

  • Avatar of roncli roncli Oct 14, 2010 at 18:05 UTC - 0 likes

    The problem is GetSpellLink(i, book) can now return nil. The solution is to check for nil before using the value. Here's a replacement for the function cacheSpellsForBook:

    local function cacheSpellsForBook(t, book)
    	for i = 1, 500 do
    		local name = GetSpellBookItemName(i, book)
    		if not name then break end
    		local spellLink = GetSpellLink(i, book)
    		if spellLink ~= nil then
    			local id = tonumber(spellLink:match("spell:(%d+)"))
    			if id and id > 0 then
    				t[name] = id
  • Avatar of Kanio Kanio Oct 14, 2010 at 12:32 UTC - 0 likes

    Getting similar (I think?):

    1x SexyCooldown-0.6.16\Modules\Spells.lua:15: attempt to index a nil value SexyCooldown-0.6.16\Modules\Spells.lua:157: in function `?' CallbackHandler-1.0-6:147: in function <...non\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:147> <string>:"safecall Dispatcher[1]":4: in function <[string "safecall Dispatcher[1]"]:4> <in C code>: ? <string>:"safecall Dispatcher[1]":13: in function `?' CallbackHandler-1.0-6:92: in function `Fire' AceEvent-3.0-3 (Bagnon):120: in function <...ace\AddOns\Bagnon\libs\AceEvent-3.0\AceEvent-3.0.lua:119>


  • Avatar of MarkParish MarkParish Oct 14, 2010 at 12:31 UTC - 0 likes

    Same error more or less as mine:

    Message: ..\AddOns\SexyCooldown\Modules\Spells.lua line 15:
       attempt to index a nil value

       (tail call): ?
       SexyCooldown\Modules\Spells.lua:156 CacheSpells()
       (tail call): ?
       [C]: ?
       [string "safecall Dispatcher[1]"]:9:
          [string "safecall Dispatcher[1]"]:5
       (tail call): ?
       Ace3\AceAddon-3.0\AceAddon-3.0.lua:539 EnableAddon()
       Ace3\AceAddon-3.0\AceAddon-3.0.lua:551 EnableAddon()
       [C]: LoadAddOn()
       ..\FrameXML\UIParent.lua:242 UIParentLoadAddOn()
       ..\FrameXML\UIParent.lua:316 TimeManager_LoadUI()



Last updated
Mar 30, 2012
Oct 13, 2010
New - Issue has not had initial review yet.
Defect - A shortcoming, fault, or imperfection
Medium - Normal priority.

Reported by

Possible assignees