Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugGrabber: Restrict fetchFromDatabase() to current game session only #33

Open
2072 opened this issue Aug 30, 2020 · 0 comments
Open

BugGrabber: Restrict fetchFromDatabase() to current game session only #33

2072 opened this issue Aug 30, 2020 · 0 comments

Comments

@2072
Copy link

2072 commented Aug 30, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant