Conversation
…addons on plugin unload
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.
Some hardening fixes for potential crashes, leaks, and retry loops.
Prevent unhandled exceptions (9373c06)
No
try/catchanywhere despite doing unsafe pointer reads, Steam API calls, and per-client hook work. All 12 entry points now catch, log with context, and return a safe default.Clean up plugin state on unload (3070cd1)
Unload()was empty and theServiceProviderwas never disposed. So leaked the SteamCallback<T>& the addon search paths added viaAddSearchPath.Check Steam error message lookup (85f3c1c)
SteamErrorMessage.Errorsholds 133 entries and was indexed directly by the rawEResult, so any code Valve adds beyond that in the future will throwIndexOutOfRangeExceptioninside the download failure handler.Stop failed downloads from looping the map forever (29694f8)
OnAddonDownloadedcleared the addon fromImportantDownloadsregardless of result, so a failure took the success path and calledReloadMap(), which raisedOnStartupServer, re-ranRefreshAddons, re-queued the same addon, and failed again indefinitely. Failures are still retried on the next map load.