anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
47 stars 16 forks source link

Very small worlds tend to crash / will not load again after leaving #785

Closed Airova closed 2 months ago

Airova commented 3 years ago

Game Version: 1.14.7 Platform: Windows 8.1 Modded: Yes (CarryCapacity, Farmland Drops Soil, Salt Production, + a few simple tweaks of my own)

Description

When making a very small world (have tried between 384x384 and 1024x1024), the world crashes when close to the world border (in creative mode). Sometimes it gives error messages you might receive on a laggy server (even though I'm playing single player). If I leave the world at any point (even if I have not received any error messages or approached the borders), it is often impossible to get back into the world. On the loading screen, it gets stuck (doesn't crash, but doesn't progress) at "Return again." then after several minutes gives messages indicating the world is shutting down ("It pauses. One last gaze... ... It sighs...") and then gets stuck until I hit "cancel".

Also, sometimes when I first enter one of these very small worlds, I find myself outside the world borders and unable to move until I use the /kill command, which spawns me back on the map somewhere. All of this is happening in creative mode only, have not tested with survival mode. I had a friend try to duplicate the problem and it happened to him as well, though not every time. It seems to happen after being in the map for 10+ minutes (rough estimation). Looking through the game logs, it seems to be giving an error related to invalid spawn coordinates (even though I'm logging out of the world within the world borders, then trying to reenter it). It is not generating a crash log, but I see messages related to invalid spawn coordinates in server-event.txt.

How to reproduce

  1. Make a very small world (384x384 or 512x512 seem to do it most often), with a low world height (192)
  2. Enter the world in creative mode
  3. Either explore near the world border until it starts giving error messages, or explore for a while (10 minutes or so) then log out and try to reenter the world. The problem does not happen every time, but if you do it a handful of times it seems likely to. (I will keep experimenting with it to see if I can narrow down exactly what causes it to happen.)

Screenshots

I'm attaching the world generation parameters I'm using. I'm trying to create a small multiplayer "battle royale" style map, so it needs to be very small. image

Logs

(server-event.txt)

13.2.2021 21:46:53 [Event] Launching server...
13.2.2021 21:46:53 [Event] Server v1.14.7, network v1.14.13, api v1.7.0
13.2.2021 21:46:53 [Event] Loading configuration...
13.2.2021 21:46:53 [Event] Loading assets...
13.2.2021 21:46:53 [Error] Multiple mods share the mod ID 'ArisServer114' ('ArisServer114.zip', 'ArisServer114.zip'). Will only load the first one.
13.2.2021 21:46:53 [Error] Multiple mods share the mod ID 'carrycapacity' ('CarryCapacity-1.14-0.5.2.zip', 'CarryCapacity-1.14-0.5.2.zip'). Will only load the first one.
13.2.2021 21:46:53 [Error] Multiple mods share the mod ID 'farmlanddropssoil' ('FarmlandDropsSoil-1.1.0.zip', 'FarmlandDropsSoil-1.1.0.zip'). Will only load the first one.
13.2.2021 21:46:53 [Error] Multiple mods share the mod ID 'saltproduction' ('SaltProduction.zip', 'SaltProduction.zip'). Will only load the first one.
13.2.2021 21:46:53 [Event] Loading save game...
13.2.2021 21:47:00 [Event] 5 metal alloys loaded
13.2.2021 21:47:00 [Event] 5 cooking recipes loaded
13.2.2021 21:47:00 [Event] 291 crafting recipes loaded from 158 files
13.2.2021 21:47:00 [Event] 197 smithing recipes loaded
13.2.2021 21:47:00 [Event] 52 clay forming recipes loaded
13.2.2021 21:47:00 [Event] 31 knapping recipes loaded
13.2.2021 21:47:00 [Event] 60 barrel recipes loaded
13.2.2021 21:47:01 [Event] Loading 7x7x6 spawn chunks...
13.2.2021 21:47:01 [Event] 0% (49 in queue)
13.2.2021 21:47:01 [Event] Begin save game ticking...
13.2.2021 21:47:01 [Event] Singleplayer Server now running!
13.2.2021 21:47:01 [Error] System.Exception: Invalid spawn coordinates found
   at Vintagestory.Server.ServerMain.EntityPosFromSpawnPos(PlayerSpawnPos playerSpawn)
   at Vintagestory.Server.ServerMain.GetSpawnPosition(String playerUID, Boolean onlyGlobalDefaultSpawn)
   at Vintagestory.Server.ServerMain.FinalizePlayerIdentification(_icpJQCjhVYa6ZAMDaGe5Bb2g5fd packet, ConnectedClient client, String entitlements)
   at Vintagestory.Server.ServerMain.HandlePlayerIdentification(_VOScRRtAYcHFvBUCVU8Q2cQeB3O p, ConnectedClient client)
   at Vintagestory.Server.ServerMain.ProcessNetMessage(NetIncomingMessage msg, NetServer mainSocket)
13.2.2021 21:48:54 [Event] Mods and systems notified, now saving everything...
13.2.2021 21:48:54 [Event] Will do offthread savegamedata saving...
13.2.2021 21:48:54 [Event] Saved player world data...
13.2.2021 21:48:54 [Event] Saved map regions...
13.2.2021 21:48:54 [Event] Saved map chunks...
13.2.2021 21:48:54 [Event] World saved! Saved 0 chunks, 0 mapchunks, 1 mapregions.
13.2.2021 21:48:54 [Event] Offthread save of savegame done.
13.2.2021 21:48:54 [Event] Offthread save of 5 chunks done.
13.2.2021 21:48:54 [Event] Offthread save of 0 map chunks done.
13.2.2021 21:49:07 [Event] Mods and systems notified, now saving everything...
13.2.2021 21:49:07 [Event] Saved savegamedata...
13.2.2021 21:49:07 [Event] Saved player world data...
13.2.2021 21:49:07 [Event] Saved map regions...
13.2.2021 21:49:07 [Event] Saved map chunks...
13.2.2021 21:49:07 [Event] Saved loaded chunks...
13.2.2021 21:49:07 [Event] Saved generating chunks...
13.2.2021 21:49:07 [Event] World saved! Saved 0 chunks, 0 mapchunks, 0 mapregions.
13.2.2021 21:49:07 [Event] Shutting down 5 server threads... 
13.2.2021 21:49:07 [Event] Killed console thread
13.2.2021 21:49:07 [Event] All threads gracefully shut down
13.2.2021 21:49:07 [Event] Doing last tick...
13.2.2021 21:49:07 [Event] Stopped the server!
Airova commented 3 years ago

Additional info: I am able to get into the world in repair mode without any trouble. However, it still gives me the error message seen at the top right while I move around, chunks fail to render (see the second screenshot, where you can see ungenerated chunks ahead but the minimap shows terrain which has already generated), and when I leave and try to return in normal mode it still gets stuck and won't let me in. This is all especially confusing, because the world is tiny, I'm running it on a good computer, and it's behaving as though it can't keep up with generating the world: image image

Also: The friend I had testing it has found that he also consistently gets this problem after being in one of these small worlds for 10+ minutes or so, though not before.

One final edit: After playing in repair mode, I have a new server-event.txt with the following text repeated over and over maybe a thousand times:

13.2.2021 22:21:48 [Fatal] System.NullReferenceException: Object reference not set to an instance of an object. at Vintagestory.Common.GameMain.GetEntitiesAround(Vec3d position, Single horRange, Single vertRange, ActionConsumable`1 matches) at Vintagestory.Common.GameMain.RayTraceForSelection(IWorldIntersectionSupplier supplier, Ray ray, BlockSelection& blockSelection, EntitySelection& entitySelection, BlockFilter bfilter, EntityFilter efilter) at Vintagestory.Common.GameMain.RayTraceForSelection(IPlayer player, BlockSelection& blockSelection, EntitySelection& entitySelection, BlockFilter bfilter, EntityFilter efilter) at Vintagestory.Server.ServerSystemEntitySimulation.OnServerTick(Single dt) at Vintagestory.Server.ServerMain.Process()

Craluminum2413 commented 2 months ago

Closing due to inactivity