Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null Reference while creating initial embarkment [fairly common] #1016

Open
mklingen opened this issue Feb 23, 2019 · 1 comment
Open

Null Reference while creating initial embarkment [fairly common] #1016

mklingen opened this issue Feb 23, 2019 · 1 comment
Labels
A Bug High priority bug Crash

Comments

@mklingen
Copy link
Collaborator

Looked at this, and what I'm seeing is that in CreateEntity<T> we're getting a crash, either while invoking the entity function, or checking to see if the entity function contains the object type, or while adding the entity to the root component.

So it could be any of those. I'm not sure how any of that could be true, but I'm putting in a check for the case where the entity library is not yet initialized. If that's true, maybe a mod messed up the entity library somehow?

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

NullReferenceException: Object reference not set to an instance of an object.
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\Entities\EntityFactory.cs", line 106, in CreateEntity
    T CreateEntity[T](System.String, Microsoft.Xna.Framework.Vector3, DwarfCorp.Blackboard)
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\World\WorldManager-NewGameSetup.cs", line 54, in CreateInitialDwarves
    Void CreateInitialDwarves(Microsoft.Xna.Framework.Vector3)
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\World\WorldManager-NewGameSetup.cs", line 67, in CreateInitialEmbarkment
    Void CreateInitialEmbarkment()
  File "C:\Users\matth\Desktop\dwarfcorp\DwarfCorp\DwarfCorpXNA\World\WorldManager-Loading.cs", line 432, in LoadThreaded
    Void LoadThreaded()

Object reference not set to an instance of an object.
@mklingen mklingen added Crash A Bug High priority bug labels Feb 23, 2019
@mklingen
Copy link
Collaborator Author

mklingen commented Mar 4, 2019

Note that as of today I haven't seen my assert trigger, so it might not be that the entity library is uninitialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A Bug High priority bug Crash
Projects
None yet
Development

No branches or pull requests

1 participant