Jump to content
  • NullReferenceException during blood moon


    Summary: NullReferenceException during blood moon


    Game Version: A20 (b218)

    Platform: PC

    OS/Version: Windows

    CPU Model: Intel i7 970 3.20GHz

    System Memory: 12 GB

    GPU Model and VRAM: nVidia GTX 1080 6 GB 

    Screen Resolution: 3840 x 2160

    Video Settings: Custom

    Game mode: SP


    Did you wipe old saves? Yes

    Did you start a new game? Yes

    Did you validate your files? Yes

    Are you using any mods? No

    EAC on or off? On


    Status: NEW


    Bug Description:
    During the third blood moon event these Null reference exceptions came during the whole blood moon. It has something to do with the electrical fences as seen in the logs. Might be connected with the degredation of these electrical fences (those fences didn't took any degredation during this blood moon event) 


    Detailed steps to reproduce the bug:


    1) No clue, didn't had any issues during the first 2 blood moon events (those fences were there in all 3 events)




    Actual result:
    During the blood moon event the NullReferenceException is popping up in the console, annoying part was that when the console is shown, you can't move the player.


    Expected result:
    No more NullReferenceExceptions on the electrical fence object. Even better would be to still have control over the character when the console is shown.


    Output logfile: https://pastebin.com/Ne3j7ybm

    User Feedback

    Recommended Comments

    Heey, i do get this error at times yeah, but it feels like this only happens after a longer gaming session. 
    Once it did happen and i relogged, it's gone for that time. I know this is kinda useless for a reproduction. I will try  if i can get a better reproduction later on the day.


    Some screenshots:

    Generator placement
    Main power line through blocks
    Front view fence connected to generator
    Front view fence connected to fence
    Top view fence connected to generator
    Top view fence connected to fence
    Front view base
    Inside view base


    For the top view i did removed the blocks on top to get this shot.

    If you guys need any more info, let me know :)

    Link to comment
    Share on other sites

    Seems i can't edit my post above, but was still thinking about this. And what might be useful as well, is that i do need to travel for 1km to this base as i moved to build closer to a large city. I dont recall exactly what day i started to explore and move out, but it was between the second and third blood moon.


    I don't know the code, but i can imagen the objects are not created outside a certain area from the player. So when the fence gets loaded into the world (or getting active), a component, script or objects within the script of that fence are not loaded or created properly. 

    Link to comment
    Share on other sites

    So i tried reproduce it again on a different setup. I placed 3 sets of 2 fences with different lengths, hooked those up to a switch to activate them one by one. See the following overview:


    Generator > switch > first fence post

    end fences


    With this i tried to lure some zombies in and to turn on the switch one at a time. The very first time I tried this, one line gave the error again as seen on the following screenshot: Null reference exception

    Even if the player walks through, the error pops up: Player shocked

    So for that matter, it is not related to the blood moon event.


    After this i restarted my game, and everything worked just fine. I haven't figured out yet what the condition is that triggers this error, restarted a few times now and placed some more lines but so far all works as intended. I will keep trying the next couple of days, if I find something else I will let you know :)

    Link to comment
    Share on other sites

    This is perfectly reliable to reproduce. I tend to play on max difficulty settings and because of that with a multitude of fences. With about 60 fences in place, those bugs would make the game unplayable.

    But there is a method of countering those errors: As long as the game gets reloaded (exit -> continue) immediately before the horde night at the very place of the horde night, mostly (still not always) those errors are gone.

    As Oxipe wrote, the error messages are NOT connected to the horde night, but to entities running through fences - as soon as those fences EXCEED A CERTAIN NUMBER. I'm still not certain about the exact limit, but having around 20 or more fences constitutes a near guarantee to get them. BUT: Exit/Reload while having the player standing at the location of the fences prevents them - mostly.

    Furthermore, this bug MAY be correlated to the bug where fence wires get redirected into infinity.

    For those not already knowing said bug: the wire between two fence posts can become redirected from one of the posts to a point in infinite distance. These wires have hitboxes and thus deliver shocks - up to infinite distance (well: at least up to the end of the map). These bugs also go away if you exit/reload the game while standing beside the affected fence posts.

    IF you see a wire going in this way to infinity, you can be sure to get null reference exceptions as well. Not necessarily for the SAME wires, but you get them.

    Link to comment
    Share on other sites

    Just an addition: There are more bugs around the electric fences:


    1. As long as the wires are correctly managed by the game engine, the wires are "hanging through" proportionally to their deterioration. They get straitened as soon as the corresponding "receiving" fence posts gets repaired. This tends to be erroneous at nearly the same rate as the previously describes bugs. This bug is as well preventable to some degree by exit/reload with the player standing at the location of the fences.

    2. The wires tend to get wrongly connected to the fence posts when you leave the location far enough and then return (as with all the other three bugs describes previously). While normally, the wire should run from TOP to TOP of the fence posts, the wire often runs from top to bottom or from bottom to bottom (thus criss cross or even sunken into the floor, thus becoming useless). As with all the other versions of bugs around electric fences, these bugs may be prevented by exit/reload with the player standing at the location of the fences.

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