cem3cem3 / AppliedEcogisticsIssues

Bug tracker for the Eco mod: Applied Ecogistics
3 stars 1 forks source link

Error when adding mod to server #27

Closed Galantir closed 3 years ago

Galantir commented 3 years ago

I get a bad Imageformatexception when i add your mod to my server. Failed to load server, Exception was Exception: BadImageFormatException Message:Bad IL format. Source:System.Private.CoreLib

System.BadImageFormatException: Bad IL format. at System.Runtime.Loader.AssemblyLoadContext.InternalLoad(ReadOnlySpan1 arrAssembly, ReadOnlySpan1 arrSymbols) at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore) at Eco.ModKit.ModKitPlugin.LoadModDlls() at Eco.ModKit.ModKitPlugin.LoadModsData(TaskCompletionSource1 done) at Eco.ModKit.ModKitPlugin..ctor(TaskCompletionSource1 done) Outer Exceptions: Exception has been thrown by the target of an invocation.

As it's a Bad Il format this usually this means there's a mistake somwhere with either calling a 32bit assembly from a 64bit or vice versa. The fact that it seems to happen when loading the mods makes this even more likely.

cem3cem3 commented 3 years ago

That's a new one. The error seems to be while loading the main dll and not the dependencies, so the discrepancy is between Eco and the mod and not between the mod and its dependencies as others tend to report.

The mod is compiled for "AnyCPU", so the bitness shouldn't matter at this point. My main thought is that it might cause issues if you're trying to run this on an ARM processor, be it the m1 macs or a raspberry pi. But even then, I'd be under the impression that dotnet would still be happy to convert it to the proper machine code.

Can you give me more detail on your setup? OS, processor type, which Eco server executable you're running, any other mods etc. Also, check if the download didn't corrupt while downloading.

Galantir commented 3 years ago

Wish i could unfortunately it's a rented server at g-portal and i have no clue what it is running on nor am i able to find any information on that. But since it's a gaming host it's most likely intel or AMD. The only other mods is the elixr pack and the beekeeping mod. They both seem to run fine. as far as the download goes tried twice so i don't think that is the issue in this case.

cem3cem3 commented 3 years ago

Assuming this was an issue with the host running the server on a platform, this should hopefully be fixed. The mod now bundles a lot more platforms for platform dependent dependencies. Feel free to re-open if it still doesn't work on g-portal.