cem3cem3 / AppliedEcogisticsIssues

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

Unable to load/start a game #21

Closed Artifysical closed 3 years ago

Artifysical commented 3 years ago

Hi,

while starting the server, right after the screen says "Loading ItemSystem", loading get's aborted and following dump log is generated.

There is no other mod. This happens with existing and new worlds.

I deleted the versions.txt, and I tried with files in a subfolder and in "root"-mod-folder.

--BEGIN DUMP-- Dump Time 10/06/2020 16:51:19

Exception Exception: NullReferenceException Message:Object reference not set to an instance of an object. Source:EcoServer

System.NullReferenceException: Object reference not set to an instance of an object. at Eco.Server.Startup.SendIpc(String ipcMessage, Exception exception) at Eco.Server.Startup.StartAsync() at Eco.Server.ApplicationHostedService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at Eco.Server.MainClass.Main(String[] args)

--END DUMP--

cem3cem3 commented 3 years ago

Try and see if disabling tiered JIT compilation will fix this issue. The only thing that should be getting run right after the mod gets loaded should be checks for the JIT.

To do this edit the file in your appdata folder at: AppData\Local\Temp.net\EcoServer\EcoServer.runtimeconfig.json. Right after the closing square bracket for "includedFrameworks":, paste the line ,"configProperties":{"System.Runtime.TieredCompilation": "false"}

Artifysical commented 3 years ago

JIT compilation should be disabled.

My config is customized. The only file named like this is located at: D:\Temp.net\EcoServer32\awajthaw.4jb

After couple of steps in between, I ended up with the whole folder copied to the location you named. Also renaming both files either "ItemSystem" or "ItemPipe" still doesn't show any effect. ... and I tried each step at least twice.

shadshack commented 3 years ago

I'm having this issue as well, also with this being the only mod installed. Disabled Tiered JIT following the instructions the mod places in the server log (basically the same thing as you said in your Oct 6 reply), but then it generates the same errors as Artifysical described in his original post.

After copying the mod files I get this log:

=======LOG======= [11:02:34.277] [1] [ Info] [Eco] >>> START EcoServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null [11:02:34.304] [1] [ Info] [Eco] [Eco Server 0.9.1.4 beta release-116]

[11:02:34.364] [5] [ Info] [Eco] [Starting [PerformancePlugin]]...
[11:02:34.364] [5] [ Info] [Eco] [Starting [PerformancePlugin]]... [Finished in 0.4ms]

[11:02:34.365] [5] [ Info] [Eco] [Server Initialization]...
[11:02:34.873] [5] [ Info] [Eco] Starting LocalizationPlugin...
[11:02:34.873] [5] [ Info] [Eco] Starting LocalizationPlugin... Finished in 0.3ms

[11:02:34.901] [5] [ Info] [Eco] Starting DifficultySettings...
[11:02:34.901] [5] [ Info] [Eco] Starting DifficultySettings... Finished in 0.0ms

[11:02:34.901] [5] [ Info] [Eco] Loading mods...
[11:02:44.979] [1] [ Info] [Eco] Mods recompiled with warnings.

[11:02:45.002] [1] [ Info] [Eco] Loading Eco.IntegrationTests...

[11:02:45.063] [1] [ Info] [Eco] Loading ItemSystem...

[11:02:46.331] [1] [Error] [Eco] Tiered JIT compilation is currently enabled. Due to missing features in Harmony, this has to be disabled. Do this now? [Y/N or wait 60s for auto Y]

[11:03:46.337] [1] [Error] [Eco] Auto proceeding to disable Tiered JIT Compilation...

[11:03:46.359] [1] [Error] [Eco] Error! Tiered JIT compilation could not be disabled automatically, please do the following to disable it manually: Edit the file: "C:\Users\Austin\AppData\Local\Temp.net\EcoServer32\4vrwwuwv.qie/EcoServer.runtimeconfig.json" Replace the contents with: { "runtimeOptions": { "tfm": "netcoreapp3.1", "includedFrameworks": [ { "name": "Microsoft.NETCore.App", "version": "3.1.4" }, { "name": "Microsoft.WindowsDesktop.App", "version": "3.1.4" }, { "name": "Microsoft.AspNetCore.App", "version": "3.1.4" } ], "configProperties": { "System.Runtime.TieredCompilation": "false" } } }

[11:03:46.370] [1] [Error] [Eco] Cause for fail: System.IO.IOException: The process cannot access the file 'C:\Users\Austin\AppData\Local\Temp.net\EcoServer32\4vrwwuwv.qie\EcoServer.runtimeconfig.json' because it is being used by another process. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path) at System.IO.File.WriteAllText(String path, String contents) at ItemSystem.tempHarmonyFix.checkTieredJIT()


Once applying the Tiered JIT Disabled file changes, it gives this log:

=======LOG======= [11:06:28.153] [1] [ Info] [Eco] >>> START EcoServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null [11:06:28.181] [1] [ Info] [Eco] [Eco Server 0.9.1.4 beta release-116]

[11:06:28.245] [3] [ Info] [Eco] [Starting [PerformancePlugin]]...
[11:06:28.245] [3] [ Info] [Eco] [Starting [PerformancePlugin]]... [Finished in 0.8ms]

[11:06:28.245] [3] [ Info] [Eco] [Server Initialization]...
[11:06:28.742] [3] [ Info] [Eco] Starting LocalizationPlugin...
[11:06:28.742] [3] [ Info] [Eco] Starting LocalizationPlugin... Finished in 0.7ms

[11:06:28.782] [3] [ Info] [Eco] Starting DifficultySettings...
[11:06:28.782] [3] [ Info] [Eco] Starting DifficultySettings... Finished in 0.0ms

[11:06:28.789] [3] [ Info] [Eco] Loading mods...
[11:06:37.556] [1] [ Info] [Eco] Mods recompiled with warnings.

[11:06:37.581] [1] [ Info] [Eco] Loading Eco.IntegrationTests...

[11:06:37.622] [1] [ Info] [Eco] Loading ItemSystem...

[11:06:38.238] [3] [ Info] [Eco] Loading mods... Finished in 9,449.0ms

[11:06:38.238] [3] [ Info] [Eco] [Server Initialization]... Finished in 9,991.7ms

[11:06:38.260] [1] [Error] [Eco] Unhandled errorSystem.NullReferenceException: Object reference not set to an instance of an object. at Eco.Server.Startup.SendIpc(String ipcMessage, Exception exception) at Eco.Server.Startup.StartAsync(StartupInfo startupInfo) at Eco.Server.ApplicationHostedService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at Eco.Server.MainClass.Main(String[] args)


cem3cem3 commented 3 years ago

According to one of the comments on the mod.io page, this may be caused by the 32bit server as opposed to the 64bit one. Try running the other executable if to see if that fixes anything.

I can confirm that the server fails with the 32bit version, but even then the exception I get has been different. I don't know if I'll be fixing the 32 bit version though, since you really shouldn't be running the server in 32bit mode, especially modded. However if there are multiple people requiring it, I'll look into it for sure.

If you could, please post the setup you're running, such as your OS, and any other things you might think are noteworthy. Annoyingly the stacktrace that gets logged for this isn't one that points to where my mod fails, so I have no real way of figuring out what the problem is until I can reproduce it.

shadshack commented 3 years ago

Thanks, I didn't even realize there was a different version of the server to run, I was just launching it from in-game. It works perfectly fine for me when starting the server as 64-bit manually.

Artifysical commented 3 years ago

Same here. Didn't knew, eco runs a crap-bit server. After running EcoServer.exe (and disabling JIT debug) manually it works fine.

Thanks a lot!