Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Axu

An open-world graphical roguelike. Still in development. · By Cynapse

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

A topic by Scorce created May 05, 2020 Views: 614 Replies: 4
Viewing posts 1 to 5
(1 edit)

Hello! I really love the game, 10/10! Because I like it so much, I really didn't want to have to post something that I am not 100% is a bug. It has happened 4 times before this. I didn't mind at first because I wanted to try different classes but this time I put a few hours into the character and its a bummer. It never loads the save after this happens so I have to start over.

I have no idea if it on my end or not, idk what I am doing to cause it. I do save and quit a ton, not sure if that has anything to do with it.

Here is the log, it says the exact same thing every time.  NullReferenceException: Object reference not set to an instance of an object

NullReferenceException: Object reference not set to an instance of an object
  at House.GetRandomPosition () [0x00070] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Map\Room.cs:159 
  at TileMap_Data.CheckPrefabs () [0x001a6] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Map\TileMap_Data.cs:173 
  at TileMap_Data.InitialTileFill () [0x00029] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Map\TileMap_Data.cs:114 
  at TileMap_Data..ctor (System.Int32 x, System.Int32 y, System.Int32 elev, System.Boolean vis) [0x0006a] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Map\TileMap_Data.cs:52 
  at TileMap.Rebuild (System.Int32 mx, System.Int32 my, System.Int32 elevation, System.Boolean lightCheck) [0x000b0] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Map\TileMap.cs:344 
  at TileMap.RebuildTexture (System.Int32 mx, System.Int32 my, System.Int32 elevation, System.Boolean lightCheck) [0x00017] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Map\TileMap.cs:316 
  at TileMap.HardRebuild () [0x00001] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Map\TileMap.cs:295 
  at TileMap.Init () [0x00101] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Map\TileMap.cs:101 
  at ObjectManager.CreateLocalMap () [0x0004a] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Utilities\Managers\ObjectManager.cs:106 
  at ObjectManager+<Initialize>d__21.MoveNext () [0x000b6] in C:\Users\mritc\Documents\GitHub\Axu\Assets\Scripts\Utilities\Managers\ObjectManager.cs:73 
  at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <375872269acd429285f3d485f54f87e5>:0 
 
(Filename: <375872269acd429285f3d485f54f87e5> Line: 0)

I know nothing about script, I hope that helps. Please let me know if you need any other information, thank you for your time!

I'm having exactly the same issue. I tried to hunt down the save file to see if I could diagnose, but I couldn't find it.

Same hope this gets answered

 really love the game 

This happens because you saved in a cave or were very recently in a cave. Save files are located at [your user]\AppData\LocalLow\Ravensong Games\Axu\Save. It can be fixed. 

Open the save file in notepad and search for "PGLm"; it should be near the very bottom of the save file. Look along this section and you will see a repeating list of text that looks like so: {"P":[104,95,0],"LTS":83376,"Ch":[],"N":""}. The specific numbers within will be different but the format will be like this. You will find the first string after the word "Local". Scan through the list of strings that look like the above. If you see any with a positive third number in the square brackets, add a minus sign in front of it. 

For example, if you see {"P":[105,95,1],"LTS":84579,"Ch":[],"N":""}, change the 1 to a -1 like so: {"P":[105,95,-1],"LTS":84579,"Ch":[],"N":""}. Check the entire list of these strings and fix any you see with that positive third number, and the save file should work again.