smaitch / Grail

World of Warcraft addon to provide a database of quest information.
31 stars 20 forks source link

Error portaling from Stormwind to Northrend on Saturday night during 15th anniversary holiday #89

Closed emmetotter closed 4 years ago

emmetotter commented 4 years ago

This may be the result of the 15th Anniversary Holiday event not following assumptions but it appears that the elapsedMinutes variable is uninitialized when used at line 3960.
The error specifically occurred when portaling from Stormwind to Northrend Dalaran at 11:05pm Eastern time on Saturday November 9. It occurred on other occassions when portaling or zoning into an instance during the 15th anniversary holiday. I've updated my local Grail.lua with a elapsedMinutes ~=nil check in the if statement on that line and this fixed the issue.

Message: Interface\AddOns\Grail\Grail.lua:3960: attempt to compare number with nil Time: Sat Nov 9 22:51:36 2019 Count: 1 Stack: Interface\AddOns\Grail\Grail.lua:3960: attempt to compare number with nil Interface\AddOns\Grail\Grail.lua:3960: in function CelebratingHoliday' Interface\AddOns\Grail\Grail.lua:7604: in function <Interface\AddOns\Grail\Grail.lua:7563> (tail call): ? Interface\AddOns\Grail\Grail.lua:9994: in functionStatusCode' Interface\AddOns\Grail\Grail.lua:4092: in function ClassificationOfQuestCode' Interface\AddOns\Wholly\Wholly.lua:1420: in function_ClassifyQuestsInMap' Interface\AddOns\Wholly\Wholly.lua:1871: in function _ForcePanelMapArea' Interface\AddOns\Wholly\Wholly.lua:4395: in functionUpdateQuestCaches' Interface\AddOns\Wholly\Wholly.lua:949: in function ?' Interface\AddOns\Wholly\Wholly.lua:2515: in function_OnEvent' Interface\AddOns\Wholly\Wholly.lua:4411: in function <Interface\AddOns\Wholly\Wholly.lua:4411>

Locals: self =

{ QuestBreadcrumbsFor = defined @Interface\AddOns\Grail\Grail.lua:8809 bitMaskClassPriest = 256 IsBugged = defined @Interface\AddOns\Grail\Grail.lua:6813 bitMaskGenderMale = 8192 _RecordArtifactLevels = defined @Interface\AddOns\Grail\Grail.lua:9407 bitMaskCompleted = 1 _PrepareWorldQuestSelfNewNPCs = defined @Interface\AddOns\Grail\Grail.lua:3306 QuestLocationsAccept = defined @Interface\AddOns\Grail\Grail.lua:8967 IsAvailable = defined @Interface\AddOns\Grail\Grail.lua:6795 NO_SKILL = -1 _HandleEventGarrisonBuildingActivated = defined @Interface\AddOns\Grail\Grail.lua:6500 bitMaskClassAll = 268443644 _HandleEventLootClosed = defined @Interface\AddOns\Grail\Grail.lua:6528 bitMaskQuestLegendary = 4096 _RemoveDelayedNotification = defined @Interface\AddOns\Grail\Grail.lua:4948 reputationFriends =
{ } questsLoremaster =
{ } NPC_TYPE_BY = "BY" NPC_TYPE_DROP = "DROP" _PostDelayedNotification = defined @Interface\AddOns\Grail\Grail.lua:8186 _MarkQuestType = defined @Interface\AddOns\Grail\Grail.lua:5317 receivedCalendarUpdateEventList = true bitMaskClassDeathKnight = 4 QuestNPCPrerequisiteTurnins = defined @Interface\AddOns\Grail\Grail.lua:9138 _ProcessServerBackup = defined @Interface\AddOns\Grail\Grail.lua:8498 bitMaskQuestVariableLevel = 4278190080 MeetsRequirementGroup = defined @Interface\AddOns\Grail\Grail.lua:7783 _EvaluateCodeAsPrerequisite = defined @Interface\AddOns\Grail\Grail.lua:5831 bitMaskInLog = 16 bitMaskQuestWeekly = 4 bitMaskHolidayNoble = 256 MeetsRequirementProfession = defined @Interface\AddOns\Grail\Grail.lua:7868 DoesNPCExist = defined @Interface\AddOns\Grail\Grail.lua:5796 npcNames =
{ } _AllEvaluateTrueS = defined @Interface\AddOns\Grail\Grail.lua:3599 bitMaskQuestFailureWithAncestor = 67043200 verifyTable =
{ } _NPCToUse = defined @Interface\AddOns\Grail\Grail.lua:8051 garrisonBuildingLevelMapping =
{ } bitMaskClassHunter = 16 _LoadContinentData = defined @Interface\AddOns\Grail\Grail.lua:3134 bitMaskQuestRaid = 128 _LocationStructure = defined @Interface\AddOns\Grail\Grail.lua:7350 _HandleEventAchievementEarned = defined @Interface\AddOns\Grail\Grail.lua:6495 checksReputationRewardsOnAcceptance = true classToMapAreaMapping =
{ } completingQuestTitle = "The Defias Kingpin" verifyTableCount = 0 playerGenderBitMask = 16384 _ReputationExceeds = defined @Interface\AddOns\Grail\Grail.lua:9595 bitMaskRaceUnused9 = 4096 zonesForLootingTreasure =
{ } bitMaskQuestMonthly = 8 mapAreaBaseClass = 200000 exists73 = true LearnObjectName = defined @Interface\AddOns\Grail\Grail.lua:7276 _ContainsAliasNPC = defined @Interface\AddOns\Grail\Grail.lua:5538 classToBitMa

smaitch commented 4 years ago

It turns out that I made an error during refactoring by not computing elapsedMinutes as that was done in _CelebratingHolidayDayEventProcessor and I missed that it is needed in this section of code. Luckily it only comes up if it Saturday and you need to check the status of quests in Dalaran in Crystalsong. The irony of course is the two quests that need this computation are no longer in game. For the next release of Grail I have updated the quests availability, plus corrected the code.