Jump to content

Object reference not set to an instance of an object.


Sjustus548

Recommended Posts

Can anyone tell me what could be causing this error to pop up?  Whenever a zombie or a player touches the section of electric fence in the picture a Null Reference exception error happens.  Would removing that section and putting it back up help or is there something else I need to do to fix it?  Any help would be greatly appreciated.

Null Reference Exception.jpg

Link to comment
Share on other sites

When the code is changed and the program tries to point to something that is no longer there, that is when you get these. Looking at your day count, I am pretty certain your save file originated from a previous version. These things can happen when playing through multiple updates on the same save.

Link to comment
Share on other sites

32 minutes ago, Roland said:

When the code is changed and the program tries to point to something that is no longer there, that is when you get these. Looking at your day count, I am pretty certain your save file originated from a previous version. These things can happen when playing through multiple updates on the same save.

Yeah we started the map in 19.0.  I was hoping playing thru one update wouldn't have the chance to break the game like this.  Would picking up all the fences and putting them back down cause the code to work properly again?

Link to comment
Share on other sites

It would help to know the actual error, Null reference exceptions are sort of like "Hey something broke". The logs will tell you exactly what broke (post one with the null ref error here and we'll see if there's something you can do).

 

But, forewarning, you may do work to fix it and then you find out you need to restart anyway.

Link to comment
Share on other sites

19 minutes ago, Jugginator said:

It would help to know the actual error, Null reference exceptions are sort of like "Hey something broke". The logs will tell you exactly what broke (post one with the null ref error here and we'll see if there's something you can do).

 

But, forewarning, you may do work to fix it and then you find out you need to restart anyway.

NullReferenceException: Object reference not set to an instance of an object
  at ElectricWireController.DamageSelf (System.Single damage) [0x000dc] in <b96846cfb0544c2da3579e57837d9053>:0 
  at ElectricWireController.touched (UnityEngine.Collider collider) [0x0019f] in <b96846cfb0544c2da3579e57837d9053>:0 
  at ElectricWireController.Update () [0x000b4] in <b96846cfb0544c2da3579e57837d9053>:0 
 
(Filename: <b96846cfb0544c2da3579e57837d9053> Line: 0)

 

That's what keeps popping up whenever the Null reference exception occurs.  Hopefully that will make more sense to you than it does to me lol.

Link to comment
Share on other sites

Roland is correctomundo there, but just based on that error it MIGHT be with all future electric fence posts as well. There were some changes to fence posts at one point, so that may be the case. I hate to say it, but it may be time for a new, clean world (after cleaning all your game files and etc.).

Link to comment
Share on other sites

10 hours ago, Jugginator said:

Roland is correctomundo there, but just based on that error it MIGHT be with all future electric fence posts as well. There were some changes to fence posts at one point, so that may be the case. I hate to say it, but it may be time for a new, clean world (after cleaning all your game files and etc.).

My apologies for not sharing the whole output log.  I saw that section repeated for 600 lines so I was hoping it would be good enough.  Let me share the whole document for you.  The error first shows up on line 898.

output_log__2020-09-25__19-37-19.txt

Link to comment
Share on other sites

1 minute ago, Sjustus548 said:

My apologies for not sharing the whole output log.  I saw that section repeated for 600 lines so I was hoping it would be good enough.  Let me share the whole document for you.  The error first shows up on line 898.

output_log__2020-09-25__19-37-19.txt 110.54 kB · 0 downloads

Thanks, it's mostly for investigation; sometimes things show up that give hints, sometimes it's things showing up in a particular order showing hints. etc. This will help when I go to investigate fence posts and dedi servers in a whole today or tomorrow.

Link to comment
Share on other sites

I have the same issue our map is from 19.0 and continuued on 19.1 

we have few electric fence installed at our shouse before the 19.1 and work fine , just some i installed in the 19.1 bring this error.

I installed (after updated in 19.1) like 8 electric fence circuit all around our bloodmoon tower spot and during the blood moon 2of us get this error the 3 other zero error when playing on my dedicated 7 day server hosted on a linux server , never get issue oin 19.0 

NullReferenceException: Object reference not set to an instance of an object
  at ElectricWireController.DamageSelf (System.Single damage) [0x000dc] in <b96846cfb0544c2da3579e57837d9053>:0 
  at ElectricWireController.touched (UnityEngine.Collider collider) [0x0019f] in <b96846cfb0544c2da3579e57837d9053>:0 
  at ElectricWireController.Update () [0x000b4] in <b96846cfb0544c2da3579e57837d9053>:0 
 
(Filename: <b96846cfb0544c2da3579e57837d9053> Line: 0)

Also looking on the server output and nothing about that!!!!
 

Link to comment
Share on other sites

On 9/27/2020 at 2:45 AM, thesweetiger said:

2 of us get this error the 3 other zero error when playing on my dedicated 7 day server hosted on a linux server , never get issue oin 19.0

That is a key clue. Two of you have one set of files, the other 3 have a different set of files, due either to incomplete/unverified installation of 19.1 or mods perhaps. (ETA: or dirty cached data, as meganoth points out below)

 

I would sort that out first, though keep in mind that after fixing it all of you might start getting the error. But at least then it'd be consistent and whatever solution you end up finding would work for everyone.

Link to comment
Share on other sites

22 hours ago, Boidster said:

That is a key clue. Two of you have one set of files, the other 3 have a different set of files, due either to incomplete/unverified installation of 19.1 or mods perhaps.

 

I would sort that out first, though keep in mind that after fixing it all of you might start getting the error. But at least then it'd be consistent and whatever solution you end up finding would work for everyone.

Not sure, but couldn't this discrepancy also come from dirty caches, i.e. files in SavesLocal having incorrect pointer data?

 

Link to comment
Share on other sites

Update: so far I can only confirm this with electrical wiring to fence posts done in a continued world/save from a previous build. Delete power.dat and the backup from your saved folder (will delete all wiring done, caution) or start a new save. That worked in 2/2 cases, one on a hosted-server with the same issue and another was on a test world I did to repro the issue.

Link to comment
Share on other sites

7 hours ago, Jugginator said:

Update: so far I can only confirm this with electrical wiring to fence posts done in a continued world/save from a previous build. Delete power.dat and the backup from your saved folder (will delete all wiring done, caution) or start a new save. That worked in 2/2 cases, one on a hosted-server with the same issue and another was on a test world I did to repro the issue.

Wrong thread Jugginator?

 

https://community.7daystodie.com/topic/21826-getting-electrocuted-without-power-connected/

Link to comment
Share on other sites

On 9/29/2020 at 4:51 AM, Jugginator said:

Update: so far I can only confirm this with electrical wiring to fence posts done in a continued world/save from a previous build. Delete power.dat and the backup from your saved folder (will delete all wiring done, caution) or start a new save. That worked in 2/2 cases, one on a hosted-server with the same issue and another was on a test world I did to repro the issue.

I had this issue crop up twice on a private multiplayer server with some friends. Here is the thing: the console error spam happened during the week before the latest update to 19.1. The server was created on A19 (b180) and the errors happened on that very same version. For reference I had detailed the situation in a Steam post merely trying to find a possible solution to continue using electric fences. I'm not quite sure what the problem could be if it isn't tied strictly to continuing an old save, but I wish you guys the best of luck in getting this one resolved.

Link to comment
Share on other sites

1 hour ago, Suminagashi said:

I had this issue crop up twice on a private multiplayer server with some friends. Here is the thing: the console error spam happened during the week before the latest update to 19.1. The server was created on A19 (b180) and the errors happened on that very same version. For reference I had detailed the situation in a Steam post merely trying to find a possible solution to continue using electric fences. I'm not quite sure what the problem could be if it isn't tied strictly to continuing an old save, but I wish you guys the best of luck in getting this one resolved.

So did it happen with a clean. new 19.1 build?

Link to comment
Share on other sites

1 hour ago, Jugginator said:

So did it happen with a clean. new 19.1 build?

As of yesterday we were still playing the same game world as before. It's just that we stopped using electric fence posts for horde nights shortly before the 19.1 update to avoid the crippling bug happening (still had some fence posts around the home base but never had a problem with them). Coincidentally, it looks like our group is keen on starting a new game soon, so I will be sure to push to try out electric fence posts again in that one and let you know if we encounter any more issues with them!

Link to comment
Share on other sites

On 9/29/2020 at 1:51 AM, Jugginator said:

Update: so far I can only confirm this with electrical wiring to fence posts done in a continued world/save from a previous build. Delete power.dat and the backup from your saved folder (will delete all wiring done, caution) or start a new save. That worked in 2/2 cases, one on a hosted-server with the same issue and another was on a test world I did to repro the issue.

So I'm not sure if this is a new development but thought I would tell you just in case it helped out your tests.  Whenever a zombie walks in to that section of the fence I get the error to pop up but we noticed my wife doesn't.  She gets the error on a different section.  We just thought it was strange.

Link to comment
Share on other sites

3 minutes ago, Sjustus548 said:

So I'm not sure if this is a new development but thought I would tell you just in case it helped out your tests.  Whenever a zombie walks in to that section of the fence I get the error to pop up but we noticed my wife doesn't.  She gets the error on a different section.  We just thought it was strange.

Yeah that's another issue  related to old save. That was one of the issues I solved in the hosted-server by deleting power.dat.  I have yet to see it in a clean game, but I plan on hooking like 50 or 100 fence posts in various configs and running horde nights at it for a while

Link to comment
Share on other sites

Big recommendation if your use electric fence go there and delete your server file before launching the game:

for windows : %localdata%/7DaysToDie\SavesLocal\ 
for linux ~/.local/7DayToDie/SavesLocal/

find the correct server folder and delete it , this will force the redownload of t he map content when your reconnect , , I tried and it worked

if you want you can delete everything . this folder content only files from server which can be redownloaded , password for server is not in this folder so don't be scary to lost it it's remaing after , also if a dev can tell to us how to prevent the console to popup to prevent unfunny moment, mostly in raid. Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...