Jump to content

Error: NullReferenceException: object reference not set to an instance of an object


Blasphemous

Recommended Posts

Hey guys,

 

Here's the background: I modified game files to re-enable 5 mods per quality 6 weapons.

Then I proceeded to give myself those weapons (through giveself command) which I already had - the ones generated before still only had 4 slots.

Unfortunately, I accidentally copied the wrong entry from the items.xml, namely meleeHandMaster, which I guess is more like a class for other melee weapons, not an actual item on its own.

This broke my game. Sadly, automatic save triggered after this and upon loading the game, I get the same message - NullReferenceException: object reference not set to an instance of an object.

It just keeps getting printed in a loop through the console without any means of stopping or continuing the game.

Do I have any chance at recovering the save file? I can still input commands in the console, I just couldn't find anything to break the loop.

This is a great character at a pretty advanced stage and I don't want to lose it.

Link to comment
Share on other sites

I guess I'll have to say bye to this one then.

Too bad, this character never died, I wanted to continue this flawless record.

On the other hand, my base was immune to hordes, all items at level 6, three perk trees done and I just cooked 10k steel for the final improvements.

Maybe it's the right time to start a new char.

Link to comment
Share on other sites

27 minutes ago, Blasphemous said:

I guess I'll have to say bye to this one then.

Too bad, this character never died, I wanted to continue this flawless record.

On the other hand, my base was immune to hordes, all items at level 6, three perk trees done and I just cooked 10k steel for the final improvements.

Maybe it's the right time to start a new char.

If you activate cheat mode and hit U, there will be a trashcan icon at the top of the inventory that can clear out anything in your bags... You could put away all your good stuff in a chest, then use that button to clear out the bad item. Haven't tested with an item that throws errors, but might be worth it to not destroy a characters progresss if you don't want that.

Link to comment
Share on other sites

15 hours ago, Blasphemous said:

I guess I'll have to say bye to this one then.

Too bad, this character never died, I wanted to continue this flawless record.

On the other hand, my base was immune to hordes, all items at level 6, three perk trees done and I just cooked 10k steel for the final improvements.

Maybe it's the right time to start a new char.

Major lesson learned here: always make backups when doing things like that, especially when it feels like "Hey uh... I probably shouldn't do this... but let's see!") :)

 

Note that, in the saved game folder for your player and etc., there are .bak files. Remove the .bak extensions and replace your broken ones with those. Odds are low that'll help since you've logged in again, but can't hurt to try.

Link to comment
Share on other sites

17 hours ago, Telric said:

If you activate cheat mode and hit U, there will be a trashcan icon at the top of the inventory that can clear out anything in your bags... You could put away all your good stuff in a chest, then use that button to clear out the bad item. Haven't tested with an item that throws errors, but might be worth it to not destroy a characters progresss if you don't want that.

The item in question has been generated on the floor of my base. Maybe there's some kind of command to remove any non-default pick-able items from the game?

Anyway, I tried waiting for the item to be naturally removed from the gameworld, as happens with all dropped items but apparently it doesn't work on this one.

 

2 hours ago, Jugginator said:

Major lesson learned here: always make backups when doing things like that, especially when it feels like "Hey uh... I probably shouldn't do this... but let's see!") :)

 

Note that, in the saved game folder for your player and etc., there are .bak files. Remove the .bak extensions and replace your broken ones with those. Odds are low that'll help since you've logged in again, but can't hurt to try.

I tried that immediately after the whole thing, was even hopeful since the bak had an older timestamp but nope. The information is stored somewhere else as well.

My problem was not "Hey i prob shouldn't do this", it was "I know exactly what I'm doing, done this a hundred times."

I used to keep a backup when spawning zombies, blocks and entire PoIs in case I screw something up but here I thought, hey, it's a non-persistent item, what could go wrong? Lessons learned.

Link to comment
Share on other sites

1 hour ago, Blasphemous said:

...

One thing you could do is go into the vanilla xml files and change around the actual item's properties.. For example, i think it has a CanDrop property that makes it so it can't be thrown out of inventory.. Might could remove that or something. I wont be home to test, but just an idea you could try if you're still tryin to keep your saves.

Link to comment
Share on other sites

  • 5 months later...

just tackled this my self i did some digging and got some new information for you guys if anyone is still having this problem its becaus some files in your game have corrupted not talking about save files the game itself has corrupted.

 

NOTE: i had problems whit entities

 

i was having problems the traders not being added as an object so i thought that id look at the game files 7 days to die/data/bundles/entities

and found out that the traders were missing so i thought that maybe there was a issue while i was installing the game maybe i didn't see it

until i made it .rar folder and tried to extract it 

the app i was using said that the 7 days to die folder was corrupted and it specificly said that the traders were corrupted 

 

i just thought this might help someone down the lines

 

so check yourself if the game is corrupted becaus that's the problem game files being corrupted

 

hope this helped some of you guys and women

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...