Jump to content

NullReferenceException at launch


Cosmos99
  • Branch: Live Branch Version: Windows Pending

Started up ONI for the first time since 26 December today - it updated when I started, displayed the Klei logo as normal, then crashed, with the classic 'A black hole ate my world!'. It gave the following crash report:

 

NullReferenceException: Object reference not set to an instance of an object

KModalScreen.OnCmpDisable () (at <5b76f8b3859f4f008c4fcb111f78ec3c>:0)
KMonoBehaviour.OnDisable () (at <2088bc352a9946b1b3e56bbd83c50ef0>:0)
UnityEngine.GameObject:SetActive(Boolean) ConfirmDialogScreen:OnPrefabInit()
KMonoBehaviour:InitializeComponent()
KMonoBehaviour:Awake()
UnityEngine.Object:Instantiate(GameObject, Transform, Boolean)
Util:KInstantiateUI(GameObject, GameObject, Boolean)
Util:KInstantiateUI(GameObject, GameObject, Boolean)
InitializeCheck:ShowErrorDialog(String)
InitializeCheck:ShowFileErrorDialogs()
InitializeCheck:Awake()
UnityEngine.Object:Instantiate(GameObject, Vector3, Quaternion, Transform)
Util:KInstantiate(GameObject, Vector3, Quaternion, GameObject, String, Boolean, Int32)
Util:KInstantiate(GameObject, GameObject, String)
LaunchInitializer:Update()

 

Taking inspiration from other answers on this forum that had similar crashes on startup, I have attempted the following:

  1. Uninstalled Avast and launched the game
  2. Reinstalled Avast, and explicitly added Oxygen Not Included and Steam to my allowed apps in Avast's Menu/Settings/Blocked & Allowed apps
  3. Uninstalled and reinstalled Oxygen Not Included multiple times, trying saving the game files to both my SSD and to my HDD
  4. Cleared my download cache in Steam
  5. Changed the name of the folder containing my ONI save files
  6. Uninstalled ONI and tried to find all folders and files related to ONI that had not been removed in this uninstallation process. I may have missed some paths because I wasn't sure where else to look.
  7. Repeated many of these steps in various orders.

 

I do not have any DLC's or mods installed, nor have I ever downloaded any. Every time I've attempted to start the game, the same crash report has been produced.

 

Does anyone have any advice?


Steps to Reproduce

Launch and update the game in Steam

Wait until the Klei logo has been displayed on startup




User Feedback


Without seeing your entire Player.log file it's hard to tell but there is likely a file permissions error in your Documents/Klei/OxygenNotIncluded folder. This could be caused by OneDrive permissions or ransomware protection. Try removing the folder (make a backup first!) and see if resolves it.

  • Thanks 2

Share this comment


Link to comment
Share on other sites

Thanks for this. I have attached the Player.log file. As far as I can tell I'm not currently logged into OneDrive on this PC, and removing my Avast antivirus did not fix the error. I'm just about to experiment a bit more with my antivirus and OneDrive to make sure, but I'll let you know!

Player.log

My housemate and I went through both our Player.log's side by side to compare where mine was going wrong. We found that for the Documents/Klei/OxygenNotIncluded folder, the log said 'write False / read False' for me, whereas for my housemate, they were both True. I went into the Properties of the OxygenNotIncluded folder, went to security, and turned on 'Full Control', which had been off for me but on for my housemate. This enabled the read and write permissions, and the game now works perfectly.

Thanks a lot for the pointers!

  • Like 2

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...