Go to Page... |
|
Thread Tools | Display Modes |
08/25/22, 02:39 PM | #1 |
[BUG] /EsoUI/Ingame/Map/WorldMapFilters_Shared.lua:129: attempt to index a nil value
This dialog pops up each time I move from one area to another (e.g. from world to delve). It started happening with the latest update (U35).
================= Stack Trace ================= Code:
/EsoUI/Ingame/Map/WorldMapFilters_Shared.lua:129: attempt to index a nil value stack traceback: /EsoUI/Ingame/Map/WorldMapFilters_Shared.lua:129: in function 'OnMapChanged' |caaaaaa<Locals> mapFilterType = 0, mode = 2 </Locals>|r /EsoUI/Libraries/Utility/ZO_CallbackObject.lua:132: in function 'ZO_CallbackObjectMixin:FireCallbacks' |caaaaaa<Locals> self = [table:1]{fireCallbackDepth = 1}, eventName = "OnWorldMapChanged", registry = [table:2]{}, callbackInfoIndex = 8, callbackInfo = [table:3]{4 = F}, callback = /EsoUI/Ingame/Map/WorldMapFilters_Shared.lua:109, deleted = F </Locals>|r user:/AddOns/TamrielMapping/TamrielMapping.lua:905: in function 'TTMP.CheckMapChange' |caaaaaa<Locals> does_match = F </Locals>|r user:/AddOns/TamrielMapping/TamrielMapping.lua:847: in function 'TTMP.OnUpdate' |caaaaaa<Locals> iNowMillis = 447880 </Locals>|r TamrielMapping_Update:3: in function '(main chunk)' |caaaaaa<Locals> self = ud, time = 447.88000488281 </Locals>|r I added debug prints in TTMP.CheckMapChange: Code:
-- ---------------------------------------------- -- Check if the map has changed and update the current player zone location -- ---------------------------------------------- function TTMP.CheckMapChange() local does_match = DoesCurrentMapMatchMapForPlayerLocation() if not does_match then TTMP.is_viewing_map = ZO_WorldMap_DidPlayerChooseCurrentMap() if not TTMP.is_viewing_map then SetMapToPlayerLocation() if TTMP_MENU_OPTIONS.ShowDebug then local mapFilterType = GetMapFilterType() if mapFilterType == MAP_FILTER_TYPE_STANDARD then dbgPrint("TTMP:CheckMapChange(): map filter type = ".."MAP_FILTER_TYPE_STANDARD") elseif mapFilterType == MAP_FILTER_TYPE_AVA_CYRODIIL then dbgPrint("TTMP:CheckMapChange(): map filter type = ".."MAP_FILTER_TYPE_AVA_CYRODIIL") elseif mapFilterType == MAP_FILTER_TYPE_AVA_IMPERIAL then dbgPrint("TTMP:CheckMapChange(): map filter type = ".."MAP_FILTER_TYPE_AVA_IMPERIAL") elseif mapFilterType == MAP_FILTER_TYPE_BATTLEGROUND then dbgPrint("TTMP:CheckMapChange(): map filter type = ".."MAP_FILTER_TYPE_BATTLEGROUND") else dbgPrint("TTMP:CheckMapChange(): unknown map filter type = "..mapFilterType) end end CALLBACK_MANAGER:FireCallbacks("OnWorldMapChanged") end end end Looking at the stack trace "TamrielMapping.lua:905" is the FireCallbacks() above. The debug prints out "MAP_FILTER_TYPE_STANDARD" (which has value 1) as the map filter type before we head into system code. In the 4th line down of the stack trace you see that mapFilterType is 0 (unknown?) in OnMapChanged(). Here is the code for this routine (from https://esoapi.uesp.net/current/src/...hared.lua.html). Code:
local function OnMapChanged() local mapFilterType = GetMapFilterType() local mode = WORLD_MAP_MANAGER:GetMode() local newCurrentPanel if mapFilterType == MAP_FILTER_TYPE_STANDARD then newCurrentPanel = self.pvePanel self.pvePanel:SetMapMode(mode) elseif mapFilterType == MAP_FILTER_TYPE_AVA_CYRODIIL then newCurrentPanel = self.pvpPanel self.pvpPanel:SetMapMode(mode) elseif mapFilterType == MAP_FILTER_TYPE_AVA_IMPERIAL then newCurrentPanel = self.imperialPvPPanel self.imperialPvPPanel:SetMapMode(mode) elseif mapFilterType == MAP_FILTER_TYPE_BATTLEGROUND then newCurrentPanel = self.battlegroundPanel self.battlegroundPanel:SetMapMode(mode) end if self.currentPanel and self.currentPanel ~= newCurrentPanel then self.currentPanel:SetHidden(true) end newCurrentPanel:SetHidden(false) self.currentPanel = newCurrentPanel end "newCurrentPanel:SetHidden(false)" is the code trying to index a nil value, meaning that newCurrentPanel is nil. You'll notice that the if-then-elseif code has no fall through else clause, such that if 'mapFilterType' is not one of the mentioned values, it will remain nil. Sooo... long question/discussion short, there needs to be an else clause, that sets the newCurrentPanel to a default value, and, they need to find out who is setting it to a bogus value (or clearing it, or not instantiating it). |
|
ESOUI » AddOns » AddOn Help/Support » [BUG] /EsoUI/Ingame/Map/WorldMapFilters_Shared.lua:129: attempt to index a nil value |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Switch to Hybrid Mode |
Threaded Mode |
|
|