Attempt to compare number with table when Angrier World Quests is enabled
Xaymar opened this issue ยท 13 comments
The following error occurs attempting to change the world icon filter when Angrier World Quests is enabled:
Message: Interface/FrameXML/QuestMapFrame.lua:535: attempt to compare number with table
Time: Sat Jan 14 22:21:41 2023
Count: 1
Stack: Interface/FrameXML/QuestMapFrame.lua:535: attempt to compare number with table
[string "@Interface/FrameXML/QuestMapFrame.lua"]:535: in function <Interface/FrameXML/QuestMapFrame.lua:528>
[string "=[C]"]: in function `OnSelection'
[string "@Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua"]:125: in function `func'
[string "@Interface/SharedXML/UIDropDownMenu.lua"]:1007: in function `UIDropDownMenuButton_OnClick'
[string "*UIDropDownMenuTemplates.xml:136_OnClick"]:1: in function <[string "*UIDropDownMenuTemplates.xml:136_OnClick"]:1>
Locals: numPOIs = Button {
0 = <userdata>
IconOverlay = Texture {
}
Border = Texture {
}
OnMouseUp = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:69
SetTrackingFilter = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:82
OnMouseDown = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:56
Background = Texture {
}
Icon = Texture {
}
KrowiWorldMapButtonsIndex = 0
InitializeDropDown = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:123
OnLoad = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:48
HandlesGlobalMouseEvent = <function> defined @Interface/SharedXML/DropDownToggleButton.lua:7
Refresh = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:74
OnSelection = <function> defined =[C]:-1
DropDown = Frame {
}
relativeFrame = ScrollFrame {
}
IsTrackingFilter = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:78
OnLoad_Intrinsic = <function> defined @Interface/SharedXML/DropDownToggleButton.lua:3
}
poiTable = <table> {
}
(*temporary) = WorldMapFrame {
0 = <userdata>
ShouldPanOnClick = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:686
GetGlobalPosition = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:541
PanTo = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:653
HandleUserActionOpenSelf = <function> defined @Interface/FrameXML/QuestLogOwnerMixin.lua:91
AreDetailLayersLoaded = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:453
RemovePin = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:218
OnCanvasScaleChanged = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:593
RemoveGlobalPinMouseActionHandler = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:840
OnQuestLogOpen = <function> defined @Interface/FrameXML/QuestLogOwnerMixin.lua:219
CalculatePinNudging = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:327
OnCanvasSizeChanged = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:609
ApplyPinPosition = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:513
SetAreaTriggerIntersectsCallback = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:273
ShouldZoomInstantly = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:694
HandleUserActionToggleQuestLog = <function> defined @Interface/FrameXML/QuestLogOwnerMixin.lua:44
NavBar = Frame {
}
pinNudgingDirty = false
SetGlobalPinScale = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:898
RefreshDebugAreaTriggers = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:401
SetShouldNavigateOnClick = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:674
NavigateToParentMap = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:786
SetDebugAreaTriggersEn
No other addons are necessary to trigger this problem.
From what I can see in that error, it doesn't mention AngierWorldQuests.
I think it is a case of the normal Blizzard UI being buggy.
I can see at least KrowiWorldMapButtons running, since it is mentioned in the log above (KrowiWorldMapButtonsIndex)
Does it happen with all addons disabled, except AngrierWorldQuests?
As stated in the OP, only Angrier World Quests is enabled. I do not even know what KrowiWorldMapButtons is, as it is not installed. I've attached a video showing the exact problem described in the OP - disabling only AngrierWorldQuests makes the map work as expected.
UrbanImpressionableAmericangoldfinch_Wow_World_of_Warcraft_1674571183.mp4
Thanks for the video.
I have just tried it on my machine, and I'm unable to reproduce the issue by toggling dungeon instances on the map.
Can you try and reproduce it again, and when the error shows, just try running this in the chat window: /reload
Then try again.
I have seen this error before, caused by unrelated things, and reloading the UI normally fixes it (which is what happens when you disable an addon).
Just to rule out if it is the addon, or if it just is the reloading of the UI that causes it to go away.
The problem is, that Blizzards own UI causes all kinds of errors in 10.0.x
Thanks
Seems like the patch today fixed it. Why it ever happened will remain a mystery it seems.
Message: Interface/FrameXML/QuestMapFrame.lua:535: attempt to compare number with table
Time: Wed Jan 25 10:49:18 2023
Count: 1
Stack: Interface/FrameXML/QuestMapFrame.lua:535: attempt to compare number with table
[string "@Interface/FrameXML/QuestMapFrame.lua"]:535: in function <Interface/FrameXML/QuestMapFrame.lua:528>
[string "=[C]"]: in function `OnSelection'
[string "@Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua"]:125: in function `func'
[string "@Interface/SharedXML/UIDropDownMenu.lua"]:1007: in function `UIDropDownMenuButton_OnClick'
[string "*UIDropDownMenuTemplates.xml:136_OnClick"]:1: in function <[string "*UIDropDownMenuTemplates.xml:136_OnClick"]:1>
Locals: numPOIs = Button {
0 = <userdata>
IconOverlay = Texture {
}
Border = Texture {
}
OnMouseUp = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:69
SetTrackingFilter = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:82
OnMouseDown = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:56
Background = Texture {
}
Icon = Texture {
}
InitializeDropDown = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:123
OnLoad = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:48
HandlesGlobalMouseEvent = <function> defined @Interface/SharedXML/DropDownToggleButton.lua:7
Refresh = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:74
OnSelection = <function> defined =[C]:-1
DropDown = Frame {
}
relativeFrame = ScrollFrame {
}
IsTrackingFilter = <function> defined @Interface/AddOns/Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:78
OnLoad_Intrinsic = <function> defined @Interface/SharedXML/DropDownToggleButton.lua:3
}
poiTable = <table> {
}
(*temporary) = WorldMapFrame {
0 = <userdata>
ShouldPanOnClick = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:686
GetGlobalPosition = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:541
PanTo = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:653
HandleUserActionOpenSelf = <function> defined @Interface/FrameXML/QuestLogOwnerMixin.lua:91
AreDetailLayersLoaded = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:453
RemovePin = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:218
OnCanvasScaleChanged = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:593
RemoveGlobalPinMouseActionHandler = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:840
OnQuestLogOpen = <function> defined @Interface/FrameXML/QuestLogOwnerMixin.lua:219
CalculatePinNudging = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:327
OnCanvasSizeChanged = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:609
ApplyPinPosition = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:513
SetAreaTriggerIntersectsCallback = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:273
ShouldZoomInstantly = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:694
HandleUserActionToggleQuestLog = <function> defined @Interface/FrameXML/QuestLogOwnerMixin.lua:44
NavBar = Frame {
}
pinNudgingDirty = false
SetGlobalPinScale = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:898
RefreshDebugAreaTriggers = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:401
SetShouldNavigateOnClick = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:674
NavigateToParentMap = <function> defined @Interface/AddOns/Blizzard_MapCanvas/Blizzard_MapCanvas.lua:786
SetDebugAreaTriggersEnabled = <function> defined @Int
SubstantialUnpleasantBengaltiger_Wow_World_of_Warcraft_1674640129.h264.2560x1440.mp4
I just noticed - it looks like the text has been cut off in the error message above.
Since I'm unable to reproduce the issue, I need the entire text from the error.
Most likely you need BugGrabber and BugSack addons to be able to see the entire error.
BugSack
2x FrameXML/QuestMapFrame.lua:535: attempt to compare number with table
[string "@FrameXML/QuestMapFrame.lua"]:535: in function <FrameXML/QuestMapFrame.lua:528>
[string "=[C]"]: in function `OnSelection'
[string "@Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua"]:125: in function `func'
[string "@SharedXML/UIDropDownMenu.lua"]:1007: in function `UIDropDownMenuButton_OnClick'
[string "*UIDropDownMenuTemplates.xml:136_OnClick"]:1: in function <[string "*UIDropDownMenuTemplates.xml:136_OnClick"]:1>
Locals:
numPOIs = Button {
0 = <userdata>
IconOverlay = Texture {
}
Border = Texture {
}
OnMouseUp = <function> defined @Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:69
SetTrackingFilter = <function> defined @Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:82
OnMouseDown = <function> defined @Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:56
Background = Texture {
}
Icon = Texture {
}
InitializeDropDown = <function> defined @Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:123
OnLoad = <function> defined @Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:48
HandlesGlobalMouseEvent = <function> defined @SharedXML/DropDownToggleButton.lua:7
Refresh = <function> defined @Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:74
OnSelection = <function> defined =[C]:-1
DropDown = Frame {
}
relativeFrame = ScrollFrame {
}
IsTrackingFilter = <function> defined @Blizzard_WorldMap/Blizzard_WorldMapTemplates.lua:78
OnLoad_Intrinsic = <function> defined @SharedXML/DropDownToggleButton.lua:3
}
poiTable = <table> {
}
(*temporary) = WorldMapFrame {
0 = <userdata>
ShouldPanOnClick = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:686
GetGlobalPosition = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:541
PanTo = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:653
HandleUserActionOpenSelf = <function> defined @FrameXML/QuestLogOwnerMixin.lua:91
AreDetailLayersLoaded = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:453
RemovePin = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:218
OnCanvasScaleChanged = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:593
RemoveGlobalPinMouseActionHandler = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:840
OnQuestLogOpen = <function> defined @FrameXML/QuestLogOwnerMixin.lua:219
CalculatePinNudging = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:327
OnCanvasSizeChanged = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:609
ApplyPinPosition = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:513
SetAreaTriggerIntersectsCallback = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:273
ShouldZoomInstantly = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:694
HandleUserActionToggleQuestLog = <function> defined @FrameXML/QuestLogOwnerMixin.lua:44
NavBar = Frame {
}
pinNudgingDirty = false
SetGlobalPinScale = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:898
RefreshDebugAreaTriggers = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:401
SetShouldNavigateOnClick = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:674
NavigateToParentMap = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:786
SetDebugAreaTriggersEnabled = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:425
SetFocusedQuestID = <function> defined @Blizzard_WorldMap/Blizzard_WorldMap.lua:420
UnregisterEvents = <function> defined @SharedXML/CallbackRegistry.lua:165
EvaluateLockReasons = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:756
GetGlobalPinScale = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:894
SetDisplayState = <function> defined @FrameXML/QuestLogOwnerMixin.lua:99
TitleCanvasSpacerFrame = Frame {
}
OnLoad = <function> defined @Blizzard_WorldMap/Blizzard_WorldMap.lua:82
RemoveDataProviderEvent = <function> defined @Blizzard_MapCanvas/Blizzard_MapCanvas.lua:128
GetNumActivePins
BugGrabber also ends at that exact point.
I did a bit of digging myself after finding a source for the Blizzard UI code. This line causes the error, as it expects numPOIs to be a number. Instead it sees a table when AngrierWorldQuests is enabled, which is unexpected as it does toggle. Looking at how this function is called reveals several calls by Blizzards UI itself, which all work fine, and two in this addon.
Two locations are suspected to trigger the bug, this one being more likely than this one. Armed with this knowledge, I dug out the remains of my Lua knowledge from Garry's mod days, and changed the former to:
if of.OnLoad and of.OnLoad == WorldMapTrackingOptionsButtonMixin.OnLoad then
hooksecurefunc(of, "OnSelection", function()
QuestMapFrame_UpdateAll()
end)
end
And tada, no more error. The reason for this is likely due to hooksecurefunc
passing the original arguments of (of).OnSelection
to the hook function, thus invoking QuestMapFrame_UpdateAll() with a table.