dwarfcorp icon indicating copy to clipboard operation
dwarfcorp copied to clipboard

Null reference while updating sunlight.

Open mklingen opened this issue 6 years ago • 1 comments

So, after looking at breadcrumbs from the other crashes we still have, what I'm seeing is a really weird phenomenon where the player enters a new game state, but then somehow returns to the Intro state. Upon returning to the intro state, (or perhaps before?) the asset manager complains that all the textures in the game basically have been unloaded -- a sign that the graphics device has died. Since loading happens in a thread it's hard to disentangle what's happening in the load thread vs. what the player is doing in this situation.

https://sentry.io/organizations/cfg/issues/871046102/?project=192119&referrer=github_plugin

NullReferenceException: Object reference not set to an instance of an object.
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Voxels\ChunkGenerator.cs", line 731, in UpdateSunlight
    Void UpdateSunlight(DwarfCorp.VoxelChunk)
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Voxels\ChunkManager.cs", line 298, in GenerateInitialChunks
    Void GenerateInitialChunks(Microsoft.Xna.Framework.Rectangle, DwarfCorp.GlobalChunkCoordinate, System.Action`1[System.String])
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\World\WorldManager-Loading.cs", line 417, in LoadThreaded
    Void LoadThreaded()

Object reference not set to an instance of an object.

mklingen avatar Mar 09 '19 00:03 mklingen

I've put in a failsafe that should prevent the underlying issue. Will need to more data to understand if it's still happening and why.

mklingen avatar Mar 17 '19 18:03 mklingen