StrangeLoopGames / EcoIssues

131 stars 21 forks source link

Docker Image: System.NullReferenceException: Object reference not set to an instance of an object. #19168

Closed eikedrost closed 3 years ago

eikedrost commented 4 years ago

Used: Ubuntu 20.04 Docker version 19.03.13, build 4484c46d9d docker-compose Version: 3 Docker Image: strangeloopgames/eco-game-server:0.9.1.1-beta-release-108 (Source Link) Log output:

 Failed to load server, Exception was Exception: NullReferenceException
 Message:Object reference not set to an instance of an object.
 Source:System.Private.CoreLib

 System.NullReferenceException: Object reference not set to an instance of an object.
    at System.Object.GetType()

    at Eco.WorldGenerator.WorldGeneratorPlugin.InitModules(Module module, Random randomizer) in C:\Jenkins\workspace\Eco Release\Server\Eco.WorldGenerator\WorldGeneratorPlugin.cs:line 83
    at Eco.WorldGenerator.WorldGeneratorPlugin.CreateWorld() in C:\Jenkins\workspace\Eco Release\Server\Eco.WorldGenerator\WorldGeneratorPlugin.cs:line 118
    at Eco.WorldGenerator.WorldGeneratorPlugin.Initialize(TimedTask timer) in C:\Jenkins\workspace\Eco Release\Server\Eco.WorldGenerator\WorldGeneratorPlugin.cs:line 101
    at Eco.Server.PluginManager.InitializePlugins() in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\PluginManager.cs:line 369
    at Eco.Server.PluginManager.PostCreateAsync(StartupInfo startupInfo) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\PluginManager.cs:line 117
    at Eco.Server.Startup.StartAsync(StartupInfo startupInfo) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\Startup.cs:line 181
 [09:05:20] Unhandled errorSystem.NullReferenceException: Object reference not set to an instance of an object.
    at System.Object.GetType()
    at Eco.WorldGenerator.WorldGeneratorPlugin.InitModules(Module module, Random randomizer) in C:\Jenkins\workspace\Eco Release\Server\Eco.WorldGenerator\WorldGeneratorPlugin.cs:line 83
    at Eco.WorldGenerator.WorldGeneratorPlugin.CreateWorld() in C:\Jenkins\workspace\Eco Release\Server\Eco.WorldGenerator\WorldGeneratorPlugin.cs:line 118
    at Eco.WorldGenerator.WorldGeneratorPlugin.Initialize(TimedTask timer) in C:\Jenkins\workspace\Eco Release\Server\Eco.WorldGenerator\WorldGeneratorPlugin.cs:line 101
    at Eco.Server.PluginManager.InitializePlugins() in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\PluginManager.cs:line 369
    at Eco.Server.PluginManager.PostCreateAsync(StartupInfo startupInfo) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\PluginManager.cs:line 117
    at Eco.Server.Startup.StartAsync(StartupInfo startupInfo) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\Startup.cs:line 181
    at Eco.Server.ApplicationHostedService.StartAsync(CancellationToken cancellationToken) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\ApplicationHostedService.cs:line 25
    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) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\Main.cs:line 42

 Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
    at System.Object.GetType()
    at Eco.WorldGenerator.WorldGeneratorPlugin.InitModules(Module module, Random randomizer) in C:\Jenkins\workspace\Eco Release\Server\Eco.WorldGenerator\WorldGeneratorPlugin.cs:line 83
    at Eco.WorldGenerator.WorldGeneratorPlugin.CreateWorld() in C:\Jenkins\workspace\Eco Release\Server\Eco.WorldGenerator\WorldGeneratorPlugin.cs:line 118
    at Eco.WorldGenerator.WorldGeneratorPlugin.Initialize(TimedTask timer) in C:\Jenkins\workspace\Eco Release\Server\Eco.WorldGenerator\WorldGeneratorPlugin.cs:line 101
    at Eco.Server.PluginManager.InitializePlugins() in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\PluginManager.cs:line 369
    at Eco.Server.PluginManager.PostCreateAsync(StartupInfo startupInfo) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\PluginManager.cs:line 117
    at Eco.Server.Startup.StartAsync(StartupInfo startupInfo) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\Startup.cs:line 181
    at Eco.Server.ApplicationHostedService.StartAsync(CancellationToken cancellationToken) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\ApplicationHostedService.cs:line 25
    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) in C:\Jenkins\workspace\Eco Release\Server\Eco.Server\Main.cs:line 42

docker-compose.yml

version: '3'

services:
  server:
    container_name: eco_game_server
    hostname: eco_game_server
    image: strangeloopgames/eco-game-server:0.9.1.1-beta-release-108
    stop_grace_period: 20s
    restart: on-failure
    ports:
      - "IP:3000:3000/udp"
      - "IP:3001:3001/tcp"
    volumes:
      - ./configs:/app/Configs
      - ./storage:/app/Storage
    networks:
      - eco_external
networks:
  eco_external:
      external: true

I have removed all existing docker images for eco and pulled image again. It doesn't work...

:(

mirasrael commented 4 years ago

Seems like a problem with your WorldGenerator.eco(.template) config. You can try to replace with original configs.

MC2k commented 3 years ago

Hello, same issue here.

server Ubuntu 18.04.5 LTS docker Docker version 20.10.2, build 2291f61 image strangeloopgames/eco-game-server:0.9.3.0-beta-develop-172.

/home/eco/Configs:/app/Configs /home/eco/worldstrorage:/app/Storage

-p 3000:3000/udp -p 3001:3001/tcp

after the crash the directory /home/eco/worldstrorage:/app/Storage has following files Game.db Game-log.db

and /home/eco/Configs:/app/Configs Voice.eco

how can i help to support resolving this issue?

MC2k commented 3 years ago

Hello, i added the following files to the /home/eco/Configs:/app/Configs folder and this issue disappeared

Backup.eco.template ModKit.eco.template Stats.eco.template Civics.eco.template Network.eco Storage.eco.template Difficulty.eco.template Network.eco.template Users.eco.template Disasters.eco.template Pause.eco.template Voice.eco EcoSim.eco.template Profanity.eco.template World.eco.template Game.eco Rooms.eco.template WorldGenerator.eco.template Localization.eco.template Sleep.eco.template WorldObjects.eco.template

TwixterZ commented 3 years ago

@MC2k you mentioned that adding file as above, you managed to fix the issue, can you confirm we can now close this issue?

MC2k commented 3 years ago

Hell, yes the issue can be closed.

TwixterZ commented 3 years ago

@MC2k Thank you! =)