Skip to content

Skip and quarantine non-essential plugins on missing offsets - #81

Open
Fonzie584 wants to merge 1 commit into
ArkServerApi:masterfrom
Fonzie584:EssentialPlugins
Open

Skip and quarantine non-essential plugins on missing offsets#81
Fonzie584 wants to merge 1 commit into
ArkServerApi:masterfrom
Fonzie584:EssentialPlugins

Conversation

@Fonzie584

Copy link
Copy Markdown
Contributor

Lets you mark which plugins are allowed to crash the server on a missing offset. Default off, nothing changes:

"EssentialPlugins": {
    "Enable": true,
    "Plugins": ["Permissions", "ArkShop"]
},
"PluginFailureWebhook": "https://discord.com/api/webhooks/..."

Everything not in the list: fails during Plugin_Init -> unloaded again and the server boots without it. Fails at runtime -> the crash stays but it writes an OffsetCrash.json next to the .dll first, and the next boot skips that plugin until the dll changes (sha256) or the symbol comes back in a cache update. A manual plugins.load still overrides the skip, the missing offset doesn't go away though.

The webhook posts one report per boot plus a card when something crashes.

The init skip only throws when the stack is clean, AsaApi frames and the loading plugin's own frames only, anything else takes the marker path.

Fixed two leaks on the way a throwing Plugin_Init left the dll loaded forever and a failing LoadLibraryExW leaked the AddDllDirectory cookie.

Tested every path on a live server. Might still be best to have a few server owners run this before it goes into a release, I'll leave that call to you, I'm not going to compile and distribute builds myself. Anyone who knows how to compile can of course test it themselves.

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

Successfully merging this pull request may close these issues.

1 participant