Blecki / dwarfcorp

An open-source 3D colony management game for PC, Mac and Linux
http://www.dwarfcorp.com
Other
580 stars 69 forks source link

Null reference while creating world preview mesh. #1027

Open mklingen opened 5 years ago

mklingen commented 5 years ago

This one has a really long breadcrumb trail.

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

NullReferenceException: Object reference not set to an instance of an object.
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\GameStates\WorldGeneration\WorldGenerator.cs", line 85, in CreateMesh
    Void CreateMesh(Microsoft.Xna.Framework.Graphics.GraphicsDevice)
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\GameStates\WorldGeneration\WorldGeneratorPreview.cs", line 600, in PreparePreview
    Void PreparePreview(Microsoft.Xna.Framework.Graphics.GraphicsDevice)
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\GameStates\WorldGeneration\WorldGeneratorState.cs", line 382, in Update
    Void Update(DwarfCorp.DwarfTime)
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\GameStates\GameStateManager.cs", line 132, in Update
    Void Update(DwarfCorp.DwarfTime)
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\DwarfGame.cs", line 739, in Update
    Void Update(Microsoft.Xna.Framework.GameTime)

Object reference not set to an instance of an object.
mklingen commented 5 years ago

Similar cause to #1028. State manager goes back to MainMenuState in the middle of a load. Same fix should have prevented this, but unknown.