#0 - July 8, 2010, 12:05 a.m.
Hello, I am an add-on developer. I maintain several popular add-ons on curse. One of my add-ons, Cooldowns, has been accused of causing this error. I can see why, since the error reports Cooldown.lua as the problem program. Of course, Cooldown.lua is a blizzard program and not part of any add-on. However, many people have blamed many different add-ons for this particular error, and even blizzard reps on these forums have blamed add-ons.
I just got the error with absolutely no add-ons loaded.
Message: Interface\FrameXML\Cooldown.lua:3: attempt to compare number with nil
Time: 07/07/10 15:06:36
Count: 1
Stack: Interface\FrameXML\Cooldown.lua:3: in function `CooldownFrame_SetTimer'
Interface\FrameXML\WatchFrame.lua:1194: in function `WatchFrameItem_UpdateCooldown'
Interface\FrameXML\WatchFrame.lua:1210: in function `WatchFrameItem_OnEvent'
[string "*:OnEvent"]:1: in function <[string "*:OnEvent"]:1>
Locals: self = WatchFrameItem2Cooldown {
0 = <userdata>
}
start = nil
duration = nil
enable = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to compare number with nil"
I worked on diagnosing this problem extensively, and I was convinced that this was NOT an add-on problem. Now that I was finally able to get the error with no add-ons loaded, I have confirmed my suspicions.
I got the error on the final quest turn-in for the An End to the Suffering quest. I also got it when turning in the Alpha Worg quest. My guess is that the blizzard code is trying to update the cooldown for a usable quest item AFTER the quest has been removed from the quest log. The problem is that nils are being passed to the CooldownFrame_SetTimer function in Cooldown.lua. This function can't handle nils as parameters. The nils are coming from a call in WatchFrameItem_UpdateCooldown which calls the API function GetQuestLogSpecialItemCooldown. It is this api function that is returning the bad nils, probably because the quest has been removed already, so it's parameter (GetId() on the button) ends up pointing to a missing quest. Or something like that.
It's a really hard problem to debug because it happens very rarely. The programmers need to figure out how GetQuestLogSpecialItemCooldown can return nils and fix that situation. Then the cooldown program will not crash.
