Jump to content

Modifying spawning.xml Results in ArgumentNullException Error


Recommended Posts

I've been trying to fix this problem for a while now; but I just don't understand what the problem is, as I see nothing wrong with the modified spawning.xml: https://pastebin.com/zqa5ynjS

I've also tried verifying game cache, reinstalling the game, and cleaning game data, followed by restarting my PC; but while in a world, I will still randomly get this error that says:

EXC ArgumentNullException: Value cannot be null.
Parameter name: Name cannot be null
EXC NullReferenceException: Object reference not set to an instance of an object 

It can take a couple seconds to pop up, or over 30 minutes. I can continue playing after closing the console; but it ruins the fun, especially when it happens seconds later.

As this error doesn't say much, here's more details of it 1/3 a way down my game log: https://pastebin.com/tGyDvtbM
I know there's quite a few mods in there; but the error only appears when I add a mod that alters the spawning.xml. I will also get my console spammed with the "Object reference not set to an instance of an object" upon leaving my world after receiving the error while in the world, which you can find half way down my game log. I don't understand what it means, so I really need anyone's help.

Link to comment
Share on other sites

The stack trace gives us names of methods and sometimes that's enough for us without source code to guess what the game was trying to do.

 

ArgumentNullException: Value cannot be null.
Parameter name: Name cannot be null
  at UnityEngine.Transform.Find (System.String n) [0x00009] in <4bba812690714c578170328b4ec178d0>:0 
  at AvatarZombieController.SwitchModelAndView (System.String _modelName, System.Boolean _bFPV, System.Boolean _bMale) [0x00000] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at EModelBase.SwitchModelAndView (System.Boolean _bFPV, System.Boolean _bMale) [0x000e8] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at EModelBase.InitCommon () [0x0002a] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at EModelBase.Init (World _world, Entity _entity) [0x000d9] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at Entity.InitEModel () [0x00061] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at Entity.Init (System.Int32 _entityClass) [0x0000d] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at EntityAlive.Init (System.Int32 _entityClass) [0x00000] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at EntityEnemy.Init (System.Int32 _entityClass) [0x00000] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at EntityFactory.CreateEntity (EntityCreationData _ecd) [0x004c2] in <d7dcfa4979674f179c13273f8b30b551>: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 <d7dcfa4979674f179c13273f8b30b551>:0 
  at EntityFactory.CreateEntity (System.Int32 _et, System.Int32 _id, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _rotation) [0x0000c] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at EntityFactory.CreateEntity (System.Int32 _et, UnityEngine.Vector3 _transformPos) [0x00014] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at SpawnManagerBiomes.SpawnUpdate (System.String _spawnerName, System.Boolean _isSpawnEnemy, ChunkAreaBiomeSpawnData _chunkBiomeSpawnData) [0x0043f] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at SpawnManagerBiomes.Update (System.String _spawnerName, System.Boolean _bSpawnEnemyEntities, System.Object _userData) [0x00007] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at World.OnUpdateTick (System.Single _partialTicks, System.ArraySegment`1[T] _activeChunks) [0x001e6] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at GameManager.UpdateTick () [0x00073] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at GameManager.gmUpdate () [0x00331] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at GameManager.Update () [0x00000] in <d7dcfa4979674f179c13273f8b30b551>:0 
 
NullReferenceException: Object reference not set to an instance of an object
  at AvatarController.Update () [0x00116] in <d7dcfa4979674f179c13273f8b30b551>:0 
  at AvatarZombieController.Update () [0x00000] in <d7dcfa4979674f179c13273f8b30b551>:0 

 

But I don't really have a guess as to what...

 

AvatarZombieController.SwitchModelAndView (System.String _modelName, System.Boolean _bFPV, System.Boolean _bMale)

 

... is trying to do, but it calls a Find() method to look for a name. My guess there's a name in your XML that doesn't match up with something. Perhaps there's a subtle typo? I don't have any experience with the XML file you're modifying, so I don't have an answer.

Link to comment
Share on other sites

On 10/11/2023 at 9:39 AM, Distinct Soul said:

I've been trying to fix this problem for a while now; but I just don't understand what the problem is, as I see nothing wrong with the modified spawning.xml: https://pastebin.com/zqa5ynjS

I've also tried verifying game cache, reinstalling the game, and cleaning game data, followed by restarting my PC; but while in a world, I will still randomly get this error that says:

EXC ArgumentNullException: Value cannot be null.
Parameter name: Name cannot be null
EXC NullReferenceException: Object reference not set to an instance of an object 

It can take a couple seconds to pop up, or over 30 minutes. I can continue playing after closing the console; but it ruins the fun, especially when it happens seconds later.

As this error doesn't say much, here's more details of it 1/3 a way down my game log: https://pastebin.com/tGyDvtbM
I know there's quite a few mods in there; but the error only appears when I add a mod that alters the spawning.xml. I will also get my console spammed with the "Object reference not set to an instance of an object" upon leaving my world after receiving the error while in the world, which you can find half way down my game log. I don't understand what it means, so I really need anyone's help.

 

I don't think it's related to the edits to spawning.xml. It looks like you have a bad entity that's been added to one of the biome spawn groups. The errors all relate to an entity that doesn't have a proper model or transform name.

 

Do you have mods that add things to biome spawns? One of those might be the cause.

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