Questie

Questie

116M Downloads

Errors when turning in quests 3.7dev line 1107

Xyter opened this issue ยท 7 comments

commented

Sometimes when I turn in a quest I'll get a lua error on line 1107 and it won't complete/remove the quest on the minimap/map. This only happens in the 3.7dev version.

I can reload the ui to fix it but would rather just fix the error if anyone knows how.

Other than that I absolutely LOVE the 3.7 version!
wowscrnshot_080117_152854

commented

Thought so. Thanks for cleaning up my garbage. :)

commented

I'm very happy you were able to fix this issue. Annoyed the hell out of me and was the main reason holding me back from pushing for the 3.7 official release.

I can confirm that the issue is fixed. I was able to consistently reproduce it on the commit before your fix, and after the fix was applied the issue no longer occurred.

The issue is reproducible by completing the quest at the bottom-most position in your quest log.

commented

Oh snap! I just reviewed this code stack. Wow... I must have been cross eyed or tired when I wrote those routines.

@Muehe how is your fix un-tracking quests? I've been running this code without knowing about this change and I don't recall seeing any weirdness.

commented

No, the hack-fix I posted above was untracking quests, but the fix in the commit that closed this issue should be fine.

commented

This is a hack fix for the nil error, but it messes with the tracker, as it constantly untracks quests when some quest event happens. Sadly Dyaxler and Zoey have been absent lately and I have neither the code knowledge nor the time to fix this properly, so for now it is all I can offer:

diff --git a/!Questie/Modules/QuestieTracker.lua b/!Questie/Modules/QuestieTracker.lua
index f934170..a333a4f 100644
--- a/!Questie/Modules/QuestieTracker.lua
+++ b/!Questie/Modules/QuestieTracker.lua
@@ -1058,6 +1058,7 @@ function QuestieTracker:BlizzardHooks()
         function RemoveQuestWatch(questIndex)
             local prevQuestLogSelection = QGet_QuestLogSelection();
             local questName, level, questTag, isHeader, isCollapsed, isComplete = QGet_QuestLogTitle(questIndex);
+            if (questName == nil) then return; end
             QSelect_QuestLogEntry(questIndex);
             local questText, objectiveText = QGet_QuestLogQuestText();
             local hash = Questie:getQuestHash(questName, level, objectiveText);
commented

Thank you for the fix, I'd rather have to toggle quests for the tracker vs reloading the UI. I appreciate it.

commented

@Xyter Hey I just pushed a commit to the dev branch, could you please check if it completely fixes your issue?