Stationeers

Stationeers

View Stats:
Mad_House Nov 21, 2020 @ 5:47pm
"IndexOutOfRangeException: Index Was Outside The Bounds Of Array"
I get this error CONSTANTLY. What does it mean?
Originally posted by Chibolete:
Originally posted by Braden:
Hey, do you happen to have the log which includes the error?

It just happened to me. problem happened at:
Assets.Scripts.Voxel.VoxelGrid.GetVoxel (System.Int32 x, System.Int32 y, System.Int32 z) [0x00000] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\VoxelGrid.cs:111

I just finished the tutorial for crafting new items using autolathe. Then I started the tutorial about creating a breathable atmosphere. The loadscreen stuck with the "Loading chunk 536 of 536", the music kept playing and the small crash alert popped. Here are the logs nearby the Exception:

Server Started
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Assets.Scripts.Networking.SteamServer:StartSteamServer(Boolean, Boolean) (at C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Steam\Matchmaking\SteamServer.cs:837)
Assets.Scripts.Networking.SteamServer:SetupGameServer(Boolean, Boolean) (at C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Steam\Matchmaking\SteamServer.cs:663)
Assets.Scripts.Serialization.<LoadWorld>d__206:MoveNext() (at C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Serialization\XmlSaveLoad.cs:2685)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at C:\buildslave\unity\build\Runtime\Export\Scripting\Coroutines.cs:17)

(Filename: C:/Jenkins/jobs/Game_Client/workspace/Assets/Scripts/Steam/Matchmaking/SteamServer.cs Line: 837)

Unloading 0 Unused Serialized files (Serialized files now loaded: 1)
IndexOutOfRangeException: Index was outside the bounds of the array.
at (wrapper managed-to-managed) System.Object.ElementAddr_2(object,int,int,int)
at Assets.Scripts.Voxel.VoxelGrid.GetVoxel (System.Int32 x, System.Int32 y, System.Int32 z) [0x00000] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\VoxelGrid.cs:111
at Assets.Scripts.Voxel.ChunkObject.GetVoxelWithNeighbor (System.Int32 x, System.Int32 y, System.Int32 z) [0x000fb] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\ChunkObject.cs:707
at Assets.Scripts.Voxel.ChunkObject.IsVoxelAboveMinDensity (System.Int32 x, System.Int32 y, System.Int32 z) [0x00001] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\ChunkObject.cs:722
at Assets.Scripts.Voxel.ChunkObject.GetNumberOfNeighbours (UnityEngine.Vector3 worldPos) [0x00024] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\ChunkObject.cs:740
at Assets.Scripts.Voxel.Mineables.get_IsOpen () [0x00000] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\Asteroid.cs:106
at Assets.Scripts.Voxel.Asteroid.CalculateOpenMineables () [0x00033] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\Asteroid.cs:310
at Assets.Scripts.Serialization.XmlSaveLoad+<LoadWorld>d__206.MoveNext () [0x009d6] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Serialization\XmlSaveLoad.cs:2923
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00028] in C:\buildslave\unity\build\Runtime\Export\Scripting\Coroutines.cs:17

(Filename: C:/Jenkins/jobs/Game_Client/workspace/Assets/Scripts/Voxel/VoxelGrid.cs Line: 111)

Added Connection Host : True
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Assets.Scripts.Networking.<WaitingPlayerLoadingWorld>d__32:MoveNext() (at C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Networking\NetworkManagerOverride.cs:1275)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at C:\buildslave\unity\build\Runtime\Export\Scripting\Coroutines.cs:17)

(Filename: C:/Jenkins/jobs/Game_Client/workspace/Assets/Scripts/Networking/NetworkManagerOverride.cs Line: 1275)
< >
Showing 1-7 of 7 comments
Killiberke Nov 24, 2020 @ 5:40pm 
I also get these. I've only just started playing and get the IndexOutOfRangeException regularly after I finish a tutorial and try start a new one. It freezes the game and I have to alt F4. After restarting the game, I can load the next tutorial without issues.

An IndexOutOfRangeException occurs when the code tries to access an element with an index that is outside the bounds of an array.
Deadeye_Rob Nov 24, 2020 @ 11:55pm 
Has anyone got a solution to this? I've reinstalled Stationeers to no effect. It's gamebreaking in my case and I cant play the game at all now!
Braden Nov 25, 2020 @ 2:21am 
Hey, do you happen to have the log which includes the error?
Mad_House Nov 25, 2020 @ 12:12pm 
Originally posted by Braden:
Hey, do you happen to have the log which includes the error?
I do not, but I can tell you that I've found that my settings are likely the cause of the error.

My view distance for objects and terrain was set high. I never received an error code when generating maps with these settings on planets like Mars and Europa, but the error code occurred when loading in Loulan as a new planet.

The crash seems to be tied to object generation in a new world - too big of a view distance can in turn cause too big of a load on the engine, and will crash it. At least this is what I suspect. It's possible for you to replicate it ; boot up the game, set your view distance for "things" higher on the scale, select New World and play Loulan. Likely the crash will occur.
Last edited by Mad_House; Nov 25, 2020 @ 12:13pm
The author of this thread has indicated that this post answers the original topic.
Chibolete Nov 28, 2020 @ 5:31pm 
Originally posted by Braden:
Hey, do you happen to have the log which includes the error?

It just happened to me. problem happened at:
Assets.Scripts.Voxel.VoxelGrid.GetVoxel (System.Int32 x, System.Int32 y, System.Int32 z) [0x00000] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\VoxelGrid.cs:111

I just finished the tutorial for crafting new items using autolathe. Then I started the tutorial about creating a breathable atmosphere. The loadscreen stuck with the "Loading chunk 536 of 536", the music kept playing and the small crash alert popped. Here are the logs nearby the Exception:

Server Started
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Assets.Scripts.Networking.SteamServer:StartSteamServer(Boolean, Boolean) (at C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Steam\Matchmaking\SteamServer.cs:837)
Assets.Scripts.Networking.SteamServer:SetupGameServer(Boolean, Boolean) (at C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Steam\Matchmaking\SteamServer.cs:663)
Assets.Scripts.Serialization.<LoadWorld>d__206:MoveNext() (at C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Serialization\XmlSaveLoad.cs:2685)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at C:\buildslave\unity\build\Runtime\Export\Scripting\Coroutines.cs:17)

(Filename: C:/Jenkins/jobs/Game_Client/workspace/Assets/Scripts/Steam/Matchmaking/SteamServer.cs Line: 837)

Unloading 0 Unused Serialized files (Serialized files now loaded: 1)
IndexOutOfRangeException: Index was outside the bounds of the array.
at (wrapper managed-to-managed) System.Object.ElementAddr_2(object,int,int,int)
at Assets.Scripts.Voxel.VoxelGrid.GetVoxel (System.Int32 x, System.Int32 y, System.Int32 z) [0x00000] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\VoxelGrid.cs:111
at Assets.Scripts.Voxel.ChunkObject.GetVoxelWithNeighbor (System.Int32 x, System.Int32 y, System.Int32 z) [0x000fb] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\ChunkObject.cs:707
at Assets.Scripts.Voxel.ChunkObject.IsVoxelAboveMinDensity (System.Int32 x, System.Int32 y, System.Int32 z) [0x00001] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\ChunkObject.cs:722
at Assets.Scripts.Voxel.ChunkObject.GetNumberOfNeighbours (UnityEngine.Vector3 worldPos) [0x00024] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\ChunkObject.cs:740
at Assets.Scripts.Voxel.Mineables.get_IsOpen () [0x00000] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\Asteroid.cs:106
at Assets.Scripts.Voxel.Asteroid.CalculateOpenMineables () [0x00033] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Voxel\Asteroid.cs:310
at Assets.Scripts.Serialization.XmlSaveLoad+<LoadWorld>d__206.MoveNext () [0x009d6] in C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Serialization\XmlSaveLoad.cs:2923
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00028] in C:\buildslave\unity\build\Runtime\Export\Scripting\Coroutines.cs:17

(Filename: C:/Jenkins/jobs/Game_Client/workspace/Assets/Scripts/Voxel/VoxelGrid.cs Line: 111)

Added Connection Host : True
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Assets.Scripts.Networking.<WaitingPlayerLoadingWorld>d__32:MoveNext() (at C:\Jenkins\jobs\Game_Client\workspace\Assets\Scripts\Networking\NetworkManagerOverride.cs:1275)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at C:\buildslave\unity\build\Runtime\Export\Scripting\Coroutines.cs:17)

(Filename: C:/Jenkins/jobs/Game_Client/workspace/Assets/Scripts/Networking/NetworkManagerOverride.cs Line: 1275)
Last edited by Chibolete; Nov 28, 2020 @ 5:31pm
Raszagal Dec 1, 2020 @ 5:46am 
I got the error as well, but for me it only happens when trying to create a Vulcan or Vulcan2 preset custom world. I made a report in the Stationeers Bug DB. It is strange because it happens a lot when trying to change the Terrain setting in the Custom World menu

Edit: The error seems to go away during generation if you play with the lava level a bit in the customisation menu, just place it at -10 or lower
Last edited by Raszagal; Dec 1, 2020 @ 6:03am
Miles Away Dec 2, 2020 @ 3:28pm 
I just got this error, no answer so far.
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: Nov 21, 2020 @ 5:47pm
Posts: 7