-
Notifications
You must be signed in to change notification settings - Fork 780
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Adding or removing Logger.Listeners and Logger.Sources can cause exceptions if some other thread is currently enumerating these lists, e.g. when calling Logger.Log. This usually causes unexpected crashes in whatever code was trying to log something at an unfortunate time.
Steps to reproduce
- Create a thread that adds and removes a Logger.Listeners in a loop.
- Call
Logger.Logon a plugin's logger in a loop. - Eventually a crash will happen.
It's possible to 100% get this to happen by trying to remove a listener from Logger.Listeners within a ILogListener.LogEvent, but that's a bit of a different issue.
BepInEx Distribution
Stable from GitHub
Log outputs
N/AEnvironment
- OS: Any
- BepInEx: 5.4.21
- Game: AnyMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working