Object reference not set to an instance of an object.

Sjustus548

Refugee
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

 
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.

 
Last edited by a moderator:
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?

 
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.

 
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.

 
Last edited by a moderator:
He needs to see your entire output log and not just an excerpt from the console output.

 
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.).

 
Last edited by a moderator:
We've been seeing this every horde night on our server as well.  The only way we can "fix" it is to log out to main menu then hop back onto the server.

 
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.

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

 
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.

View attachment 15146
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.

 
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!!!!
 

 
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.

 
Last edited by a moderator:
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?

 
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.

 
Last edited by a moderator:
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/

 
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.

 
Back
Top