Jump to content

NullReferenceException when launching server


Vintorez91

Recommended Posts

Dearest readers,

 

So a friend and I were playing 7d2d, while suddenly some crazy♥♥♥♥♥♥started happening. This included, but wasn't limited to:

 

* Sleeping zombies appearing in our base;

* Not being able to open containers;

* Being able to cut 50 units of wood with one cut.

 

We tried rebooting the server and our clients, but to no avail. What's even worse: the console started to spam this particular error message - see the title, whenever I tried to restart the server.

 

Shame, because we were so close to reaching night 14 with 64 Zeds / player, and were desperate to liquidate some ♥♥♥♥ers.

 

So I looked around the stickies at the Steam forum and saw a similar problem posted here: http://steamcommunity.com/app/251570/discussions/1/558752451201277624/.

 

"Workaround #1 &2: NullReferenceException: Object reference not set to an instance of an object" seem to be relevant, but: I can't find a file called "saves" in my C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\Data\Worlds\Navezgane

 

Regarding workaround 2:

This second version of this error occurs when one of the files related to the game save has become corrupted.

 

To attempt to fix the save:

Locate the save (usually found in C:\Users\<USERNAME>\Documents\7 Days To Die\Saves\Navezgane or C:\Users\<USERNAME>\Documents\7 Days To Die\Saves\RandomGen folder)

Rename to add a .bad to the folder name. Example a save of Game1 would get renamed to the folder Game1.bad

Create a new game of the same type with the same initial name and the settings you would like to use. Example create a new Game1 named game.

Exit the game.

Now copy the Player and Region folders from the .bad version of the save to the new save folder. Example, copy the Players folder and the Regions folder from Game1.bad to the newly created Game1 saying YES to overwrite.

 

NOTE: if this scenario works you can then delete the Game1.bad folder.

 

NOTE 2: The day will be reset to 1 in this case.

 

I can't locate the save in either of those two suggestions. Instead, my saves are located in my C:\Users\*USER*\AppData\Roaming\7DaysToDie\Saves\Navezgane\ folder. Is this the folder I am looking for?

 

Additional info:

- Run on a PC through Steam (and therefore the latest v.)

- MP local

- Not using any mods

- PC is old but should be more than enough to handle 7d2d (but I doubt this issue is client-sided)

 

Unfortunately, all the logs are too big to be posted on any of the suggested sites.

 

Thanks and all the best,

 

Maik

Link to comment
Share on other sites

you can delete all the old logs (server off) and create a new one. post it here and give us the link:

 

https://pastebin.com/

 

Thanks for the reply. I managed to find and compress the log file where the problems first occured.

 

Please see https://pastebin.com/RTN63GKX

 

As you can see in the log, I restarted the server several times after the crazy ♥♥♥♥ - as described in the opening post - started happening, implying there might be some form of causation.

 

Maik

Link to comment
Share on other sites

Okay - as of Alpha 16 requirements for the game is 8GB of Ram. When you run the server and client off of the same machine, you'll inevitably run into low ram issues. If you start an MP game and your friend connects that way - then you shouldn't have this issue anymore. Might check ram usage with and without the server running.

Link to comment
Share on other sites

Okay - as of Alpha 16 requirements for the game is 8GB of Ram. When you run the server and client off of the same machine, you'll inevitably run into low ram issues. If you start an MP game and your friend connects that way - then you shouldn't have this issue anymore. Might check ram usage with and without the server running.

 

Thanks for the reply, Cadamier. I have 8gb of RAM, so shouldn't that be enough?

 

But what makes you think a lack of RAM is the cause of this problem in the first place? It seems to be a corrupt save game.

 

Is there any way to fix the crash or are we 'doomed' to try the workaround posted above?

Link to comment
Share on other sites

Well, that is for the game and that's minimum but 16GB is recommended, but basically you're virtually running two instances of it, albeit - not 'really.'

 

Well first things first. Memory issue would be priority at the moment. I noted you should try to play a multiplayer game first with your friend. This would confirm the memory issue; either you or your friend can host. Once that's resolved/shown then you would have the ability to either move the MP-Server game over to your client, and then play from there.

Link to comment
Share on other sites

Well, that is for the game and that's minimum but 16GB is recommended, but basically you're virtually running two instances of it, albeit - not 'really.'

 

Well first things first. Memory issue would be priority at the moment. I noted you should try to play a multiplayer game first with your friend. This would confirm the memory issue; either you or your friend can host. Once that's resolved/shown then you would have the ability to either move the MP-Server game over to your client, and then play from there.

 

I'm afraid I do not understand. I accept the issues with my memory.

 

But my friend and I have been playing a multiplayer game all the way, with me hosting.

Link to comment
Share on other sites

Let me back track a bit. Well with this game and many other games/programs when you have memory issues - they tend to give you a tonne of other issues. As of Alpha 16 the minimum just for the game is 8GB of ram, now - server requirements seem to be 'lower' but you're already at the minimum... And now you've added a server to the same system.

 

The 'saved games' you should be looking for would be in that server directory, not your '7D2D' directory. Since you and your friend play on your server - that is where the saved games would be. Albeit some/if not all are/should be saved to you're system. But since you're both playing on the server they're stored there. Looks like you can also try repairing the chunk. Looks like it maybe a 'bad'/'item' on the map/inventory. But...

 

There's a difference from running Multiplayer games on your client (7D2D 'program'), Single Player Games on your client and Running a Multiplayer Game ON a Dedicated Server (that's the only thing it does), and also running a Multiplayer Server on a Client which is what you're doing.

Link to comment
Share on other sites

Let me back track a bit. Well with this game and many other games/programs when you have memory issues - they tend to give you a tonne of other issues. As of Alpha 16 the minimum just for the game is 8GB of ram, now - server requirements seem to be 'lower' but you're already at the minimum... And now you've added a server to the same system.

 

There's a difference from running Multiplayer games on your client (7D2D 'program'), Single Player Games on your client and Running a Multiplayer Game ON a Dedicated Server (that's the only thing it does), and also running a Multiplayer Server on a Client which is what you're doing.

 

Thanks for the explanation Cadamier. Unfortunately both my friend and I both have 8gb's of RAM. The system is running smooth though, so I find it strange that this can be an explanation.

 

The 'saved games' you should be looking for would be in that server directory, not your '7D2D' directory. Since you and your friend play on your server - that is where the saved games would be. Albeit some/if not all are/should be saved to you're system. But since you're both playing on the server they're stored there. Looks like you can also try repairing the chunk. Looks like it maybe a 'bad'/'item' on the map/inventory. But...

 

(1) So what directory should I look in for what particular file?

 

(2) How do I repair this chunk?

Link to comment
Share on other sites

Dearest readers,

 

So a friend and I were playing 7d2d, while suddenly some crazy♥♥♥♥♥♥started happening. This included, but wasn't limited to:

 

* Sleeping zombies appearing in our base;

* Not being able to open containers;

* Being able to cut 50 units of wood with one cut.

 

We tried rebooting the server and our clients, but to no avail. What's even worse: the console started to spam this particular error message - see the title, whenever I tried to restart the server.

 

Shame, because we were so close to reaching night 14 with 64 Zeds / player, and were desperate to liquidate some ♥♥♥♥ers.

 

So I looked around the stickies at the Steam forum and saw a similar problem posted here: http://steamcommunity.com/app/251570/discussions/1/558752451201277624/.

 

"Workaround #1 &2: NullReferenceException: Object reference not set to an instance of an object" seem to be relevant, but: I can't find a file called "saves" in my C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\Data\Worlds\Navezgane

 

Regarding workaround 2:

 

 

I can't locate the save in either of those two suggestions. Instead, my saves are located in my C:\Users\*USER*\AppData\Roaming\7DaysToDie\Saves\Navezgane\ folder. Is this the folder I am looking for?

 

Additional info:

- Run on a PC through Steam (and therefore the latest v.)

- MP local

- Not using any mods

- PC is old but should be more than enough to handle 7d2d (but I doubt this issue is client-sided)

 

Unfortunately, all the logs are too big to be posted on any of the suggested sites.

 

Thanks and all the best,

 

Maik

 

Well you posted both answers in the first post.

"C:\Users\*USER*\AppData\Roaming\7DaysToDie\Saves" is where Servers place the save game files.

I feel unqualified to answer the repair chunk question. Albeit I think its in your first posting too. Although I've read some postings on repairing chunks, you'll have to locate the chunk in question before you can go into the saved files and delete the chunk in question. Technically the server will rebuild the chunk, but I do remember there are some warnings about doing this since any 'user' items/bases, placed blocks within that chunk will be deleted. I play with a group of 9 of us and we haven't had any issues like this. But I would inform them if such happened and 'advise' to 'clean wipe' and start over.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...