Jump to content

Error NullReference not set to the instance of an object? How to track down the culprit??


Recommended Posts

Title says it, anyone know how to do this? It happens randomly and then just spams the console on repeat. Nothing changes about the game, can still play perfectly fine, even reloaded the game and still works fine just constant errors. Anyway to track down what the null reference is? is there a specific log file i can find or how do i determine what is the cause?

Link to comment
Share on other sites

The game's log file will have a stack trace that will be very important for diagnosing the problem.

 

This kind of thing is usually handled in the "General Support" part of the forums. I think you'll find instructions there as to where to find those log files.

Link to comment
Share on other sites

18 hours ago, zztong said:

 

This kind of thing is usually handled in the "General Support" part of the forums. I think you'll find instructions there as to where to find those log files.

 

The log file location is also in the page which is linked in the red "report a bug" banner at the top of the forums. Just in case it's easier to go there than the general support forum.

 

Also, the general support forum isn't appropriate for modded games. If the game is modded, then here is appropriate, or in the thread started by the mod author.

 

If you do ask here, make sure you say which mods are installed.

Edited by khzmusik (see edit history)
Link to comment
Share on other sites

Post your logfile (via pastebin) and someone can assist you with troubleshooting the issue.  I was able to help some recently that was playing the game in Alpha 18 only not to realize they were using a save game file from Alpha 20.

 

There's plenty of brain cells floating around these forums that two will eventually join and might be able to point you in the right direction  😉

 

 

Link to comment
Share on other sites

2 hours ago, BFT2020 said:

Post your logfile (via pastebin) and someone can assist you with troubleshooting the issue.  I was able to help some recently that was playing the game in Alpha 18 only not to realize they were using a save game file from Alpha 20.

 

There's plenty of brain cells floating around these forums that two will eventually join and might be able to point you in the right direction  😉

 

 

awesome, im having a hard time finding the actual log file. The game is heavily modded, I normally do pretty well with finding and fixing the bad codes or whatever in the xmls. But this one seems to just pop up randomly and then spams the console with nonstop nullref errors. and counts up into 6000+ lol. So where can i get you the log file from the next time it does this?

Exception: Item with name 'meleeHandZombieStrong2' not found!
  at (wrapper dynamic-method) EntityAlive.DMD<EntityAlive::CopyPropertiesFromEntityClass>(EntityAlive)
  at Entity.InitCommon () [0x00029] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at EntityZombie.InitCommon () [0x00000] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at Entity.Init (System.Int32 _entityClass) [0x00007] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at EntityAlive.Init (System.Int32 _entityClass) [0x00000] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at EntityEnemy.Init (System.Int32 _entityClass) [0x00000] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at EntityFactory.CreateEntity (EntityCreationData _ecd) [0x004c2] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at EntityFactory.CreateEntity (System.Int32 _et, System.Int32 _id, ItemValue _itemValue, System.Int32 _count, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _transformRot, System.Single _lifetime, System.Int32 _playerId, System.String _skinName, System.Int32 _spawnById, System.String _spawnByName) [0x0001b] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at EntityFactory.CreateEntity (System.Int32 _et, System.Int32 _id, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _rotation) [0x0000c] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at EntityFactory.CreateEntity (System.Int32 _et, UnityEngine.Vector3 _transformPos) [0x00014] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at SpawnManagerBiomes.SpawnUpdate (System.String _spawnerName, System.Boolean _isSpawnEnemy, ChunkAreaBiomeSpawnData _chunkBiomeSpawnData) [0x00443] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at (wrapper dynamic-method) SpawnManagerBiomes.DMD<SpawnManagerBiomes::Update>(SpawnManagerBiomes,string,bool,object)
  at World.OnUpdateTick (System.Single _partialTicks, System.ArraySegment`1[T] _activeChunks) [0x001e6] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at GameManager.UpdateTick () [0x00073] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at GameManager.gmUpdate () [0x00305] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at GameManager.Update () [0x00000] in <ffc99a688d2b435db53bb46aed82ca49>:0 

NullReferenceException: Object reference not set to an instance of an object
  at Inventory.get_holdingItemData () [0x00038] in <ffc99a688d2b435db53bb46aed82ca49>:0 
  at (wrapper dynamic-method) EntityAlive.DMD<EntityAlive::Update>(EntityAlive)



this is the error, i found it in the log file. I believe it will be linked to the Mod i have installed for shortening the zombie reach.

Link to comment
Share on other sites

Well, it added a new attack item for zombies in your items.xml file that is for sure.  The area that is trying to find this item would be in the entityclasses file that is referencing it as a weapon

 

From vanilla code for zombie template:

 

    <property name="HandItem" value="meleeHandZombie01"/>

 

You will be looking for something that references

 

    <property name="HandItem" value="meleeHandZombieStrong2"/>

 

So the easiest thing is to look at mods that added or modified zombie types.

 

When the error pops up, that is when the game is trying to spawn in the enemy type.  This could either be a POI spawn, a random spawn in the world, a wandering horde spawn, or a bloodmoon spawn.

Edited by BFT2020 (see edit history)
Link to comment
Share on other sites

15 minutes ago, zztong said:

 

Oh! Oh! I'm sorry. I should have realized it was a modded game. Sorry for the confusion.

 

I didn't actually know if it's a modded game. I just assumed it was since they posted here. But that just reinforces why people should say whether it is or not. :)

Edited by khzmusik (see edit history)
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...