Repository navigation
Detect plugin loader errors while disabling Bukkit plugins - #212
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the plugin loader fails to clean up after a plugin while disabling it, Paper logs
Error occurred (in the plugin loader) while <step> for <plugin> (Is it up to date?).Nothing was detected for these lines before, because
PluginDisablingProblemonly matchedError occurred while disabling.This PR adds patterns to
PluginDisablingProblemfor all nine cleanup steps that Paper logs this way: disabling, cancelling tasks, global tasks and async tasks, unregistering services, events, lifecycle event handlers and plugin channels, and removing chunk tickets.All of these steps run while the plugin is being disabled, so they are reported as the existing "could not be disabled" problem with the same solutions instead of a new problem per step.
The nine steps are listed literally in
PluginDisablingProblem::PLUGIN_LOADER_STEPS, one pattern each, so thewhile enablingline is not reported as a disabling problem.The log comes from a Paper 26.3 test server with a plugin whose custom
HandlerListthrows inunregister(Plugin).A throwing
PluginEnableEventorPluginDisableEventlistener does not cause these lines: Paper catches it and logsCould not pass event, whichPluginRuntimeProblemalready detects.Changes
PluginDisablingProblemPluginDisablingProblempaper-plugin-loader-unregistering-events-26-3.log