René's URL Explorer Experiment


Title: Duplicate loading of plugins · Issue #129 · RocketModFix/RocketModFix · GitHub

Open Graph Title: Duplicate loading of plugins · Issue #129 · RocketModFix/RocketModFix

X Title: Duplicate loading of plugins · Issue #129 · RocketModFix/RocketModFix

Description: General Related to #9 I accidentally came across a problem with undefined static behavior in plugins, which led to a critical bug in Rocket.Core.Plugins.RocketPluginManager. The core of the issue lies in plugins being loaded into the gam...

Open Graph Description: General Related to #9 I accidentally came across a problem with undefined static behavior in plugins, which led to a critical bug in Rocket.Core.Plugins.RocketPluginManager. The core of the issue l...

X Description: General Related to #9 I accidentally came across a problem with undefined static behavior in plugins, which led to a critical bug in Rocket.Core.Plugins.RocketPluginManager. The core of the issue l...

Opengraph URL: https://github.com/RocketModFix/RocketModFix/issues/129

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Duplicate loading of plugins","articleBody":"### General\n\nRelated to #9 \n\nI accidentally came across a problem with undefined static behavior in plugins, which led to a critical bug in `Rocket.Core.Plugins.RocketPluginManager`.\n\nThe core of the issue lies in plugins being loaded into the game process multiple times due to an incorrect DLL loading order.\n\nThis behavior completely breaks the Singleton pattern, effectively turning it into a kind of \"Dualton\".\n\nThe problem is easier to illustrate with an example.\n\n---\n\n### Example/Reproduce\n\nThe `Rocket/Plugins` folder contains the following files:\n- `ADependantPlugin.dll`\n- `CorePlugin.dll`\n\nHere, `ADependantPlugin.dll` references code from `CorePlugin.dll` (the files order matters in this case).\n\nReferencing the code from:\n- https://github.com/RocketModFix/RocketModFix/blob/19e5b744460b8da4a91236154c7af26960c3a9d8/Rocket/Rocket.Core/Plugins/RocketPluginManager.cs#L78\n- https://github.com/RocketModFix/RocketModFix/blob/19e5b744460b8da4a91236154c7af26960c3a9d8/Rocket/Rocket.Core/Plugins/RocketPluginManager.cs#L43\n\nRocket’s behavior is as follows:\n- It caches the paths to all unique DLLs from `Rocket/Libraries` and `Rocket/Plugins`.\n- It starts loading DLLs from `Rocket/Plugins` sequentially into the game process.\n- It loads `ADependantPlugin.dll`, which requires `CorePlugin.dll`.\n- Through `OnAssemblyResolve`, `CorePlugin.dll` is loaded using `Assembly.Load()`.\n- Later, `CorePlugin.dll` is loaded again via `Assembly.LoadFile()` inside the loop of `LoadAssembliesFromDirectory()`.\n\nAs a result, we end up with two identical DLLs loaded into the game. This causes static constructors to be called twice.\n\nSo, even if `public static CorePlugin Instance { get; private set; }` was set during `Load()` of the `CorePlugin`, it will be reset to `null` upon repeated access, throwing an exception.\n\n---\n\n### Note\n\nAt the moment, I haven’t had time to create a repository to reproduce the issue, as I discovered it while working on a client project.\n\nHowever, if a repro repository is needed, feel free to ask and I’ll be happy to provide one.\n\nThe issue can be temporarily resolved by renaming `ADependantPlugin.dll` to `DependantPlugin.dll`, so it loads **after** `CorePlugin.dll`, as the folder content becomes:\n- `CorePlugin.dll`\n- `DependantPlugin.dll`\n\n\n\n### Conclusion\nDespite the possibility of working around this issue, I believe this kind of hidden bug is extremely problematic.","author":{"url":"https://github.com/IlyaSergeevich0","@type":"Person","name":"IlyaSergeevich0"},"datePublished":"2025-05-06T01:07:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/129/RocketModFix/issues/129"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:18ef216e-0741-9b9d-8043-419049bf06e1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9A22:1A3D6D:7F79E7:A841BC:698EC191
html-safe-noncedd36f1d52616ab4f3aa0989cc8c936c2590c98bfddbf0e47dddcd47414693390
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTIyOjFBM0Q2RDo3Rjc5RTc6QTg0MUJDOjY5OEVDMTkxIiwidmlzaXRvcl9pZCI6IjUxMzAxNjY3NDU1MjUzMDU3NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2ad1251661695eca9af07a4beca045d97ccb426b9a766a22924c06c312556237
hovercard-subject-tagissue:3041199471
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/RocketModFix/RocketModFix/129/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c1df4d0252fc347b70f5e2e3bf77e2eeb6a552476a6b973af9798bff10e8c78e/RocketModFix/RocketModFix/issues/129
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c1df4d0252fc347b70f5e2e3bf77e2eeb6a552476a6b973af9798bff10e8c78e/RocketModFix/RocketModFix/issues/129
og:image:altGeneral Related to #9 I accidentally came across a problem with undefined static behavior in plugins, which led to a critical bug in Rocket.Core.Plugins.RocketPluginManager. The core of the issue l...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameIlyaSergeevich0
hostnamegithub.com
expected-hostnamegithub.com
Nonecb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba
turbo-cache-controlno-preview
go-importgithub.com/RocketModFix/RocketModFix git https://github.com/RocketModFix/RocketModFix.git
octolytics-dimension-user_id148712015
octolytics-dimension-user_loginRocketModFix
octolytics-dimension-repository_id708477287
octolytics-dimension-repository_nwoRocketModFix/RocketModFix
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id259763703
octolytics-dimension-repository_parent_nwoSmartlyDressedGames/Legally-Distinct-Missile
octolytics-dimension-repository_network_root_id259763703
octolytics-dimension-repository_network_root_nwoSmartlyDressedGames/Legally-Distinct-Missile
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee6b91a7e6e46287d26887e3fb7a4161657bab8f7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/issues/129#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FRocketModFix%2FRocketModFix%2Fissues%2F129
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FRocketModFix%2FRocketModFix%2Fissues%2F129
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=RocketModFix%2FRocketModFix
Reloadhttps://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/issues/129
Reloadhttps://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/issues/129
Reloadhttps://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/issues/129
RocketModFix https://patch-diff.githubusercontent.com/RocketModFix
RocketModFixhttps://patch-diff.githubusercontent.com/RocketModFix/RocketModFix
SmartlyDressedGames/Legally-Distinct-Missilehttps://patch-diff.githubusercontent.com/SmartlyDressedGames/Legally-Distinct-Missile
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FRocketModFix%2FRocketModFix
Fork 9 https://patch-diff.githubusercontent.com/login?return_to=%2FRocketModFix%2FRocketModFix
Star 30 https://patch-diff.githubusercontent.com/login?return_to=%2FRocketModFix%2FRocketModFix
Code https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix
Issues 19 https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/issues
Pull requests 5 https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/pulls
Discussions https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/discussions
Actions https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/actions
Models https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/models
Security 0 https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/security
Insights https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/pulse
Code https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix
Issues https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/issues
Pull requests https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/pulls
Discussions https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/discussions
Actions https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/actions
Models https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/models
Security https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/security
Insights https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/RocketModFix/RocketModFix/issues/129
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/RocketModFix/RocketModFix/issues/129
Duplicate loading of pluginshttps://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/issues/129#top
https://github.com/IlyaSergeevich0
https://github.com/IlyaSergeevich0
IlyaSergeevich0https://github.com/IlyaSergeevich0
on May 6, 2025https://github.com/RocketModFix/RocketModFix/issues/129#issue-3041199471
#9https://github.com/RocketModFix/RocketModFix/issues/9
RocketModFix/Rocket/Rocket.Core/Plugins/RocketPluginManager.cshttps://github.com/RocketModFix/RocketModFix/blob/19e5b744460b8da4a91236154c7af26960c3a9d8/Rocket/Rocket.Core/Plugins/RocketPluginManager.cs#L78
19e5b74https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/commit/19e5b744460b8da4a91236154c7af26960c3a9d8
RocketModFix/Rocket/Rocket.Core/Plugins/RocketPluginManager.cshttps://github.com/RocketModFix/RocketModFix/blob/19e5b744460b8da4a91236154c7af26960c3a9d8/Rocket/Rocket.Core/Plugins/RocketPluginManager.cs#L43
19e5b74https://patch-diff.githubusercontent.com/RocketModFix/RocketModFix/commit/19e5b744460b8da4a91236154c7af26960c3a9d8
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.