Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Unavoidable Habitat.ConstructFacilities NullReferenceException crashes the game

View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Distant Worlds 1 Series >> Tech Support >> Unavoidable Habitat.ConstructFacilities NullReferenceException crashes the game Page: [1]
Message << Older Topic   Newer Topic >>
Unavoidable Habitat.ConstructFacilities NullReferenceEx... - 1/17/2016 12:11:09 AM   


Posts: 3
Joined: 1/16/2016
Status: offline

Firstly: new to the game and I have enjoyed it immensely so far. Thanks to the developers for all their work on it.

I was planning my next strike to liberate the independent Sol system from their perpetual pirate war. (It seriously never seemed to end. Not sure if that's common, but it's pretty entertaining!)

However, much to my dismay, I've run into this error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at DistantWorlds.Types.Habitat.ConstructFacilities(Double timePassed)
   at DistantWorlds.Types.Habitat.DoTasks(DateTime time)
   at DistantWorlds.Main.PQo4IlPDFvaC1bjsUOp(Object , DateTime )
   at DistantWorlds.Main.oP9trwAmGw(DateTime  , Int64  , BuiltObjectList  , Boolean  )
   at DistantWorlds.Main.ProgramLoop()

(This seems to have been reported once before, so perhaps it cannot be fixed. The forum won't let me post a link to it, apologies.)

It occurs every time I reach a certain date, +/- 5 days. I'm not sure if this error refers to an actual planet facility being constructed or a habitat module on a ship, but I've tried to work around it. Things I've tried:

  • Deleting all other empires and pirate factions.
  • Deleting all of my own ships and bases.
  • Removing any planet facilities under construction on my planets. (I'm assuming that deleting an empire would do the same for the AI.)
  • Going back to an earlier save (over a year) and letting it run through without doing anything.
  • Going back to the same earlier save and deleting all other factions and all of my own ships/bases/facilities under construction.

    The error still occurs at around the same time. I'm beginning to wonder if there's a zombie object stuck in the game trying to be built.

    I've put a zip in the upload FTP site with the name "[Bitwise]Habitat.ConstructFacilities NullReferenceException". The error occurs within 10 days of unpausing.

    If there are any suggestions on other ways to try to avoid this, or if I can provide any other information, please let me know.

    < Message edited by Bitwise -- 1/17/2016 1:14:18 AM >
  • Post #: 1
    RE: Unavoidable Habitat.ConstructFacilities NullReferen... - 1/17/2016 5:44:52 AM   

    Posts: 22686
    Joined: 10/4/2012
    Status: offline
    sorry for the default reply but sometimes it does help.

    add the exe of the game to your Anti Virus and firewall program, to make sure check the logs of these to see if it was one of them which was to blame.

    That usually means a 3rd party program, like an Internet security programs, is interfering with the game or update installation.

    run the game from a admin account and use full admin permissions.

    please make sure all game pre requisite are installed with the game, even if you think or fully know there are already installed, it will only over write, and it may be that you have a older or newer version of these where as the game in question may need a certain version.

    please make sure you are running the latest game version and have up to date drivers installed on your pc,

    If you have the original version. So you'll need to update it from the Internet.
    Please note that you'll only need the last update, as the updates are comprehensive.

    (in reply to Bitwise)
    Post #: 2
    RE: Unavoidable Habitat.ConstructFacilities NullReferen... - 1/17/2016 9:18:29 PM   


    Posts: 3
    Joined: 1/16/2016
    Status: offline
    No problem, and thanks, I agree it's important to cover the basics first. I have reinstalled the game and all components but there is no change, sadly.

    I can start a new game without any issue but I am a bit reluctant to do so right away, even though this error might be very rare.

    (in reply to zakblood)
    Post #: 3
    RE: Unavoidable Habitat.ConstructFacilities NullReferen... - 1/18/2016 4:43:38 AM   

    Posts: 22686
    Joined: 10/4/2012
    Status: offline
    the only thing that you can do with code is try and replicate it, if you can do this for certain with a given save, then the developers can fix it, but it has to be reproducible from a save using a well written and easy to follow steps, if you can, then it's a bug, but if you do it and it doesn't crash there machine, then it's not a game code bug but a hardware / software one, with something on your pc that the game code doesn't like, and that's the problem with random events i'm sorry to say, if it happens more often it's good as it normally means it's reproducible, the more rare it is, the harder it is to fix, if it only happens at a given point and then only on your pc and not reproducible from the save on the developers, it won't or can't / or next to imposable to fix with a patch

    (in reply to Bitwise)
    Post #: 4
    RE: Unavoidable Habitat.ConstructFacilities NullReferen... - 1/18/2016 11:10:25 PM   


    Posts: 3
    Joined: 1/16/2016
    Status: offline
    Yes, hopefully someone can take a look at the save I uploaded. I'd be interested to know if it happens to other people. Thanks again!

    (in reply to zakblood)
    Post #: 5
    RE: Unavoidable Habitat.ConstructFacilities NullReferen... - 1/19/2016 12:08:56 PM   


    Posts: 5186
    Joined: 8/12/2010
    Status: offline
    To be fair, Elliot has solved a bunch of rare crashed based on a report like the original alone. Of course a save game that is predictable can help in finding a root cause of the crash.

    There are lots of things that can be achieved with a null check and/or a lock/synchronization block :)

    If you need a bit of a confidence and got some spare electricity and stuff, I can suggest to start a fully automated game to build confidence in the game stability. If (when) it eventually crashes, pay attention to the date of the last auto save, my guess is that it will run far longer than you are ever likely to actually play a game. If it even crashes before you get tired of it taking ages and a half to save :)

    How to do so? When you start a game, go into menu (escape, top left button, that kind of stuff), options and set Rule in Absentia as your style to quickly get all automated. Then head into Empire Settings from the same screen, and select "Suppress all popups" or something very similar.

    It can even be a bit fun to watch poor AI fleet management at times ;-)

    (in reply to Bitwise)
    Post #: 6
    Page:   [1]
    All Forums >> [New Releases from Matrix Games] >> Distant Worlds 1 Series >> Tech Support >> Unavoidable Habitat.ConstructFacilities NullReferenceException crashes the game Page: [1]
    Jump to:

    New Messages No New Messages
    Hot Topic w/ New Messages Hot Topic w/o New Messages
    Locked w/ New Messages Locked w/o New Messages
     Post New Thread
     Reply to Message
     Post New Poll
     Submit Vote
     Delete My Own Post
     Delete My Own Thread
     Rate Posts

    Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI