-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReflectionTypeLoadException on Windows Headless #4
Comments
The error is thrown in NML before the OnEngineInit function is even called From what I remember the error gets thrown here at the GetTypes call because it tries to load every type in my assembly even the ones referencing unloaded types |
If NML was the culprit I'd expect it to have crashed when I ran it on Windows headed. But it actually worked fine. But I see what you're saying: it's not OnEngineInit() that's crashing, it's InitializeMod(). So there's something going on here I still don't understand. For some reason headed can handle this case, while headless can't. Windows Headed Log Snippet:
|
I'm thinking the move here is to make a test build of NML that pulls the NeosMod type out of an assembly attribute instead of a type scan. So you'd add something like |
I don't know the reason why there's a difference between headless and headed, On windows headless the error is thrown before OnEngineInit() is called
|
I found this earlier which seems a little gross but |
Oh that's terrible. I'm using it immediately. |
Well, as I was able to fix this with NML changes alone this issue clearly doesn't represent a HeadlessTweaks bug, so I'm closing it. |
full log file
This is a brand new headless install with all default configs, and the only installed mod is HeadlessTweaks v1.2.0.
My reproduction steps:
NeosModLoaderHeadless.dll
,0Harmony.dll
, andHeadlessTweaks.dll
in the Windows file propertiesNeos.exe -LoadAssembly "Libraries/NeosModLoaderHeadless.dll"
Now here's the haunted part: I also installed HeadlessTweaks into my normal, head-having Windows install and it didn't throw a ReflectionTypeLoadException. So either .NET is just behaving strangely and differently for the Headless instance, or something in these three lines is causing issues. But also it's crashing before it's even able to hit the "Discord.NET library not found" log, so I'm just confused.
The text was updated successfully, but these errors were encountered: