Attempt to index local 'entity' (a nil value) - in function 'traceentity'

If I recall correctly, the bug that led to this error corrupted the building and we probably won’t be able to rescue this save game. Sorry for the bad news.

I found a bug in game while designing a building. It happened while I was placing some individual voxels for decoration. After the bug occurred I could not edit the building any longer and my hearthlings refused to build it.

release-453 (x64)
...nehearth/components/building/building_component.luac:120: attempt to index local 'entity' (a nil value)
stack traceback:
	radiant/modules/events.luac:68: in function <radiant/modules/events.luac:65>
	...nehearth/components/building/building_component.luac:120: in function '_trace_entity'
	...nehearth/components/building/building_component.luac:33: in function '_restore_structure_traces'
	...nehearth/components/building/building_component.luac:17: in function 'obj'
	radiant/modules/events.luac:15: in function 'self'
	radiant/modules/events.luac:80: in function <radiant/modules/events.luac:78>
	[C]: in function 'xpcall'
	radiant/modules/events.luac:78: in function <radiant/modules/events.luac:70>

Hey there @Dadrick, welcome back to the discourse, it has been a while :smile:!

Unfortunately, your error appears nearly identical to this one:


Your issue is just in the function self instead of instance. @Albert already acknowledge the error in the above thread, and also mentioned that the save is likely to not be rescuable…:frowning:

Paging @8BitCrab, @Relyss, or @SteveAdamo for a merge…also, the above thread needs “[Ack]”

Its ok, was only a hope from me. :smile:

I hope the save game / error report was helpful for the next versions so that not occurs again.

How can I find in the game data the map number?
To restart the map again?

Hit Ctrl-C to open the console and type world_seed.

2 Likes

@Albert, has this been fixed?

Unclear, but I’m leaning no.

@seanparko welcome to the discourse ( I might be beating some of the mods to it but welcome anyway)

im sure @yshan and/or @sdee will like the log =]

Summary:
The slab will become invisible and can not be removed,also u cant build anything coz the block is actually here
The worker cant aslo do anything to it but they can walk on it like walking on the air

Steps to reproduce:
1)Create some slab in a house
2) After the workers built the slab “you can actually see it”, use the slab erase function on the built slab
3)save and load your game
4)Go and check the slab you erased you will mention that they disappered
5)now you have some invisible slab they the worker can do nothing on it (except walking on it)
You cant even build slabs on the place

Expected Results:
Idk what should it be if i erase the built slab

Actual Results:
You got some bugged slab

Notes:
""""""""""""“A error appear every time i load the game”"""""""""""

release-523 (x64)
...onehearth/components/building/building_component.lua:295: attempt to index local 'entity' (a nil value)
stack traceback:
	radiant/modules/common.lua:214: in function 'report_traceback'
	radiant/modules/common.lua:225: in function <radiant/modules/common.lua:219>
	...onehearth/components/building/building_component.lua:295: in function '_trace_entity'
	...onehearth/components/building/building_component.lua:105: in function '_restore_structure_traces'
	...onehearth/components/building/building_component.lua:66: in function 'obj'
	radiant/modules/events.lua:76: in function 'instance'
	radiant/modules/events.lua:209: in function <radiant/modules/events.lua:203>
	[C]: in function 'xpcall'
	radiant/modules/common.lua:234: in function 'xpcall'
	radiant/modules/events.lua:203: in function <radiant/modules/events.lua:174>

Attachments:

Version Number and Mods in use:
Version release 523 and no mods using

System Information:
Win 7 64bit
8gb ram
GTX970 display

Sorry for my poor english and bad presentation

Hey there @James_Pong, welcome to the Discourse!

I merged your post over here, thanks for confirming that this error is still occurring in release-523. As the error occurs each time you load the game, can you upload the save so the devs can review it?

To upload a save, locate the folder in C:\Program Files (x86)\Steam\steamapps\common\Stonehearth\saved_games (assuming a default Steam install), zip the individual save’s folder (not the entire saved_games folder), and upload it. If the *.zip is less than 10 MB, feel free to upload it directly to the Discourse. If larger, please upload it to a cloud storage site like Dropbox, Google Drive, File Dropper, etc. and post the sharing link here.

Engine Error on Load Game

Hello, I get the following error every time I load my current game. I think it is save specific as I have not always received this error. The error isn’t fatal, it’s just annoying. Also, I don’t know if this is related, but my goblins seem to be permanently stuck in a peaceful state. That could be a separate issue though

release-491 (x64)
...nehearth/components/building/building_component.luac:124: attempt to index local 'entity' (a nil value)
stack traceback:
	radiant/modules/events.luac:84: in function <radiant/modules/events.luac:81>
	...nehearth/components/building/building_component.luac:124: in function '_trace_entity'
	...nehearth/components/building/building_component.luac:37: in function '_restore_structure_traces'
	...nehearth/components/building/building_component.luac:17: in function 'obj'
	radiant/modules/events.luac:44: in function 'instance'
	radiant/modules/events.luac:98: in function <radiant/modules/events.luac:96>
	[C]: in function 'xpcall'
	radiant/modules/events.luac:96: in function <radiant/modules/events.luac:86>

Steps to reproduce:

  1. Load one of my save games (the forum won’t let me attach it)

Expected Results:
Opens up my game error free

Actual Results:
Getting the error pop-up after I load. Other than the goblins issue, I haven’t noticed anything out of the ordinary

Notes:
It keeps happening whether I re-start the program or not

Attachments:
I would attach a save, but the forum won’t let me

Version Number and Mods in use:
release-491 (x64)

System Information:
Windows 8.1 Pro 64 bit
Intel Core i7-2600K
AMD Radeon R9 200 series
Windoes directory on single PCI Slot SDD
Steam Folder on a Raid 1+0 with 4 SSDs

Try this to upload your save :slightly_smiling:
@jomaxro

https://drive.google.com/file/d/0B4Rzdy6yaET2V1k1X1RqeHNhNTQ/view?usp=sharing

I think this may work. Let me know if anyone has any issues downloading it

Hey there @Kevin_Swiecicki, welcome to the Discourse! Thanks for the report and the save. Based on the error, it appears that something went wrong when doing something building related. An unfortunate “feature” in Stonehearth is that many errors that occur will pop up again on save load. I am not sure the technical reason why, but it definitely occurs with some frequency. You are correct that this is save specific, and I agree that it is not likely fatal. Going to ping @Albert to see if he can shed some light on why some errors reappear on load.

Sorry that i just got 7zip in my computer,so i would upload it to the google drive

You can see a wooden house floor there,thats the bugged place

https://drive.google.com/file/d/0B4d7YhqJ2WcFdmFQbkVOOHJZMEU/view?usp=sharing

1 Like

the save file?
upload the save to something like googledrive or dropbox then post the link here

@seanparko: To upload a save, locate the folder in C:\Program Files (x86)\Steam\steamapps\common\Stonehearth\saved_games (assuming a default Steam install), zip the individual save’s folder (not the entire saved_games folder), and upload it. If the *.zip is less than 10 MB, feel free to upload it directly to the Discourse. If larger, please upload it to a cloud storage site like Dropbox, Google Drive, File Dropper, etc. and post the sharing link here.

I got this error message, I don’t know what it is but I’m posting it here so someone who knows this stuff might be able to fix it.

Hey there @WasteOfBananas, welcome to the Discourse!

I merged your report here to go with the previous reports.

I believe I am getting the same issue and error message. It appears to be related to placing slab when using the building editor. The building I’m creating is all slab placement except for the floor, but the error seems to reproduce consistently only when I try placing a slab block in a certain spot.

Steps to reproduce:
1-Build using slab
2-Eventually run into error while placing slab in a specific spot for unknown reason (See screenshot for exact placement that the error occurred). Can’t place slab anywhere anymore, error continuously generates. Can’t delete building.
3-Save game (in my case, I saved a new save file just in case)
4-Reload save game
5-Error occurs again on completed save load; however, I’m able to place slab again or remove the building, except if I…
6-Try placing the slab in same spot that I got the error at originally.
7-Get the error constantly again when attempting to place slabs or attempt to delete the building, until next save reload.

Expected Results:
I expected to place slab in that precise spot and continue to place more slab without errors popping up, and be able to delete the building if I wanted.

Actual Results:
Can’t place slab anywhere, can’t delete building (after attempting to place slab in precise spot , as well as doing so after a fresh save load)

Attachments:
I tried to place the slab wood block in the area denoted by the red circle to finish the 2 wide wood column:

Here is my save file:

https://www.dropbox.com/s/1d94caltt4k7zbm/SaveGameFiles.zip?dl=0

Versions and Mods:
-develop-3010 (x64)
-No installed mods

System Information:
OS: Win10 (10.0.10586)
CPU: AMD Phenom II X6 1100T 3300Mhz
Phys Memory: 20 GB
GPU: NVIDIA GeForce GTX 660