Questie

Questie

122M Downloads

Lua error QuestieMap.lua:836

Padparadscha opened this issue ยท 12 comments

commented

Every time I get an Item from the NPC who gives me the quest I get following LUA error

Message: Interface\AddOns\Questie\Modules\Map\QuestieMap.lua:836: bad argument #1 to 'next' (table expected, got nil)
Time: Wed Sep 28 17:48:17 2022
Count: 1
Stack: Interface\AddOns\Questie\Modules\Map\QuestieMap.lua:836: bad argument #1 to 'next' (table expected, got nil)

Locals:

commented

Tested it. Did not work for me. Problem is still there

One thing I forgot to note was this was the only quest in my quest log, perhaps that made a difference.

commented

What quest is this for?

commented

Nearly every Quest in Kaltarra

commented

I reproduced it with the repeatable quest 11940 Dragon Hunt.

This time the Lua error was longer.

Message: Interface\AddOns\Questie\Modules\Map\QuestieMap.lua:836: bad argument #1 to 'next' (table expected, got nil)
Time: Wed Sep 28 18:10:40 2022
Count: 1
Stack: Interface\AddOns\Questie\Modules\Map\QuestieMap.lua:836: bad argument #1 to 'next' (table expected, got nil)
[string "@interface\AddOns\Questie\Modules\Tracker\QuestieTracker.lua"]:1382: in function <...ce\AddOns\Questie\Modules\Tracker\QuestieTracker.lua:1367>
[string "@interface\AddOns\Questie\Modules\Tracker\QuestieTracker.lua"]:659: in function <...ce\AddOns\Questie\Modules\Tracker\QuestieTracker.lua:569>
[string "@interface\AddOns\Questie\Modules\Tracker\QuestieTracker.lua"]:733: in function Update' [string "@Interface\AddOns\Questie\Modules\Tracker\QuestieTracker.lua"]:1336: in function func'
[string "@interface\AddOns\Questie\Modules\Libs\QuestieCombatQueue.lua"]:25: in function <...e\AddOns\Questie\Modules\Libs\QuestieCombatQueue.lua:17>
[string "@interface\SharedXML\C_TimerAugment.lua"]:16: in function <Interface\SharedXML\C_TimerAugment.lua:14>

Locals: questId = 11940
player =

{
RotateDirection = defined @interface\SharedXML\Vector2D.lua:126
GetLength = defined @interface\SharedXML\Vector2D.lua:118
Normalize = defined @interface\SharedXML\Vector2D.lua:122
Dot = defined @interface\SharedXML\Vector2D.lua:106
GetLengthSquared = defined @interface\SharedXML\Vector2D.lua:114
GetXY = defined @interface\SharedXML\Vector2D.lua:77
OnLoad = defined @interface\SharedXML\Vector2D.lua:68
IsZero = defined @interface\SharedXML\Vector2D.lua:110
DivideBy = defined @interface\SharedXML\Vector2D.lua:90
x = 3573.820801
y = 6649.048340
Subtract = defined @interface\SharedXML\Vector2D.lua:98
Clone = defined @interface\SharedXML\Vector2D.lua:130
Cross = defined @interface\SharedXML\Vector2D.lua:102
ScaleBy = defined @interface\SharedXML\Vector2D.lua:86
SetXY = defined @interface\SharedXML\Vector2D.lua:81
IsEqualTo = defined @interface\SharedXML\Vector2D.lua:72
Add = defined @interface\SharedXML\Vector2D.lua:94
}
coordinates =
{
}
quest =
{
requiredSourceItems =
{
}
Description =
{
}
Zone = 4024
startedBy =
{
}
tagInfoWasCached = true
requiredLevel = 69
reputationReward =
{
}
SpecialObjectives =
{
}
Objectives =
{
}
IsTrivial = defined @interface\AddOns\Questie\Database\QuestieDB.lua:654
ObjectiveData =
{
}
questFlags = 4224
level = 71
Finisher =
{
}
nextQuestInChain = 0
requiredRaces = 0
IsRepeatable = true
requiredClasses = 0
questLevel = 71
sourceItemId = 35506
Starts =
{
}
specialFlags = 1
Id = 11940
preQuestSingle =
{
}
parentQuest = 0
name = "Drachenjagd"
IsComplete = defined @interface\AddOns\Questie\Database\QuestieDB.lua:649
zoneOrSort = 4024
objectivesText =
{
}
finishedBy =
{
}
objectives =
{
}
}
_GetWorldPlayerPosition = defined @interface\AddOns\Questie\Modules\Tracker\QuestieTracker.lua:1345
QuestieDB =
{
objectCompilerOrder =
{
}
questDataOverrides =
{
}
_QueryItemSingle = defined @interface\AddOns\Questie\Database\compiler.lua:1189
itemCompilerOrder =
{
}
questKeys =
{
}
questFlags =
{
}
objectDataOverrides =
{
}
_npcAdapterQueryOrder =
{
}
NPCPointers =
{
}
IsActiveEventQuest = defined @interface\AddOns\Questie\Database\QuestieDB.lua:397
ObjectPointers =
{
}
IsComplete = defined @interface\AddOns\Questie\Database\QuestieDB.lua:636
factionTemplate =
{
}
IsParentQuestActive = defined @interface\AddOns\Questie\Database\QuestieDB.lua:452
objectKeys =
{
}
questCompilerTypes =
{
}
objectKeysReversed

commented

@Padparadscha could you try to recompile your database? /questie -> Advanced -> Recompile Database.

And also make sure you are running the latest version v7.2.3 atm

commented

version is 7.2.3. recompiling the Database did not work. Tested with the same quest.
I tried a little bit more. The Fault is in combination with Arkinventory (version 3.09.68)

made also a reinstall from Arkinventory, did not help.

commented

v7.3 didn't work for me either. I don't think it's related to Arkinventory specifically because I also get the error with Bagnon or different map addons like Leatrix and Mapster. It appears to happen every time there is a quest item associated with a quest

commented

I just wanted to chime in to confirm I am seeing this as well, Wrath classic, Version 7.3. Bagnon and leatrix plus in use.
There are several similar errors to this cropping up and the other similarity beyond map/bag mods seems to be addons that modify/ add to tooltips.

commented

I have also seen this bug regularly in WOTLK Classic. Here's what I tried:

Tested with quest "Cheese for Glowerfield" in Dalaran, but it occurs randomly on other quests too.

  1. Disable all addons, abandon quest, reload UI - still get error

  2. Disable all addons, abandon quest, recompile Questie database, reload UI - still get error

  3. Disable all addons, abandon quest, reset Questie, reload UI - no error

  4. All addons enabled, abandon quest, reset Questie, reload UI - no error

So resetting Questie seems to fix the issue, but I have done this previously and had the issue re-occur.

commented

I have also seen this bug regularly in WOTLK Classic. Here's what I tried:

Tested with quest "Cheese for Glowerfield" in Dalaran, but it occurs randomly on other quests too.

  1. Disable all addons, abandon quest, reload UI - still get error
  2. Disable all addons, abandon quest, recompile Questie database, reload UI - still get error
  3. Disable all addons, abandon quest, reset Questie, reload UI - no error
  4. All addons enabled, abandon quest, reset Questie, reload UI - no error

So resetting Questie seems to fix the issue, but I have done this previously and had the issue re-occur.

Tested it. Did not work for me. Problem is still there

commented

The main thing I'm finding with this bug is that it's intermittent. I can pick up a quest, it'll trigger the LUA error, then I abandon it and reload UI, and it doesn't trigger the LUA error. Repeat process - sometimes I'll get the error, sometimes I won't.

This makes me think it's some sort of server lag. To try and fix it, I've modified the function below in Questie\Modules\Map\QuestieMap.lua:

I only tested for a few minutes, but it seems to help by delaying the code that is triggering the error. Feel free to replace the same function in your file to test.

function QuestieMap:GetNearestSpawn(objective)
    if not objective then
        return nil
    end
    local playerX, playerY, playerI = HBD:GetPlayerWorldPosition()
    local bestDistance = 999999999
    local bestSpawn, bestSpawnZone, bestSpawnId, bestSpawnType, bestSpawnName

	C_Timer.After(2, function() -- ADDED THIS LINE 
		if next(objective.spawnList) then
			for id, spawnData in pairs(objective.spawnList) do
				for zone, spawns in pairs(spawnData.Spawns) do
					for _,spawn in pairs(spawns) do
						local uiMapId = ZoneDB:GetUiMapIdByAreaId(zone)
						local dX, dY, dInstance = HBD:GetWorldCoordinatesFromZone(spawn[1]/100.0, spawn[2]/100.0, uiMapId)
						local dist = HBD:GetWorldDistance(dInstance, playerX, playerY, dX, dY)
						if dist then
							if dInstance ~= playerI then
								dist = 500000 + dist * 100 -- hack
							end
							if dist < bestDistance then
								bestDistance = dist
								bestSpawn = spawn
								bestSpawnZone = zone
								bestSpawnId = id
								bestSpawnType = spawnData.Type
								bestSpawnName = spawnData.Name
							end
						end
					end
				end
			end
		end
	end) -- ADDED THIS LINE

    return bestSpawn, bestSpawnZone, bestSpawnName, bestSpawnId, bestSpawnType, bestDistance
end
commented

I tested out your change and it does seem to resolve the problem. I tried the sons of hodir dailies which provide quest items and they didn't error. They consistently errored prior to the changes.