RaiderIO / raiderio-addon

RaiderIO AddOn
https://raider.io/addon
Other
40 stars 21 forks source link

"Interface\AddOns\RaiderIO\core.lua:2898: attempt to compare nil with number" #177

Closed higherorderfunctor closed 3 years ago

higherorderfunctor commented 3 years ago

Version: v202107031502

Getting a Lua error this morning trying to read mythicKeystoneProfile.currentScore. I was able to temporarily fix by adding a nil check to line 2898.

if overallScore > (mythicKeystoneProfile.currentScore ~= nil and mythicKeystoneProfile.currentScore or 0) then

Full error output:

Message: Interface\AddOns\RaiderIO\core.lua:2898: attempt to compare nil with number
Time: Sun Jul  4 08:18:45 2021
Count: 1
Stack: Interface\AddOns\RaiderIO\core.lua:2898: attempt to compare nil with number
[string "@Interface\AddOns\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua"]:758: in function <...Ons\TradeSkillMaster\LibTSM\Service\ErrorHandler.lua:717>
[string "=[C]"]: ?
[string "@Interface\AddOns\RaiderIO\core.lua"]:2898: in function `OverrideProfile'
[string "@Interface\AddOns\RaiderIO\core.lua"]:3082: in function <Interface\AddOns\RaiderIO\core.lua:3079>
[string "@Interface\AddOns\RaiderIO\core.lua"]:3091: in function `callbackFunc'
[string "@Interface\AddOns\RaiderIO\core.lua"]:615: in function `SendEvent'
[string "@Interface\AddOns\RaiderIO\core.lua"]:550: in function <Interface\AddOns\RaiderIO\core.lua:546>

Locals: errMsg = "Interface\AddOns\RaiderIO\core.lua:2898: attempt to compare nil with number"
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:355
 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"
}
WFrancois commented 3 years ago

Heyas, thanks for the report!

This is fixed in https://github.com/RaiderIO/raiderio-addon/commit/870f9e8217bcff7efa34ed82a5e8a3e11c84289f

A build is coming out soon on curse and the client to fix this :)