BugGrabber: Restrict fetchFromDatabase() to current game session only
2072 opened this issue ยท 0 comments
Just thought I switched to the fifth dimension today because fetchFromDatabase() fetches stack-traces from all sessions and thus can report non-existing stack-traces involving removed add-ons...
This can make debugging very difficult or even impossible if one doesn't come to suspect a bug in BugGrabber itself...
Changing fetchFromDatabase() to the following in BugGrabber.lua
fixes the problem:
local function fetchFromDatabase(database, target)
local currentSessionId = addon:GetSessionId()
for i, err in next, database do
if err.message == target and err.session == currentSessionId then
-- This error already exists
err.counter = err.counter + 1
return table.remove(database, i)
end
end
end