[Develop-2494] Error using single block

It’s seems a pretty common bug to me with this alpha build but I didn’t find anything about it so here is the bug !

Sometimes when I use the single block command while creating a custom template an error appears : (don’t know how, I get the bug several times making me lot of save)

develop-2494 (x64)
radiant/modules/entities.luac:86: attempt to index local 'entity' (a nil value)
stack traceback:
	[C]: ?
	radiant/modules/entities.luac:86: in function 'get_world_grid_location'
	stonehearth/services/server/build/build_service.luac:130: in function '_subtract_region_from_floor'
	stonehearth/services/server/build/build_service.luac:91: in function '_add_floor_type'
	stonehearth/services/server/build/build_service.luac:81: in function 'add_floor'
	stonehearth/services/server/build/build_service.luac:50: in function 'cb'
	stonehearth/services/server/build/build_service.luac:295: in function 'do_command'
	stonehearth/services/server/build/build_service.luac:50: in function <stonehearth/services/server/build/build_service.luac:49>

develop-2494 (x64)
c++ exception: lua runtime error
stack traceback:

After this bug appears my game is pretty done. When I tried to add again another bug this error appears :

develop-2494 (x64)
...hearth/services/server/build/build_undo_manager.luac:6: assertion failed!
stack traceback:
	[C]: ?
	[C]: in function 'assert'
	...hearth/services/server/build/build_undo_manager.luac:6: in function 'begin_transaction'
	stonehearth/services/server/build/build_service.luac:294: in function 'do_command'
	stonehearth/services/server/build/build_service.luac:50: in function <stonehearth/services/server/build/build_service.luac:49> 

    develop-2494 (x64)
    c++ exception: lua runtime error
    stack traceback:

Then I’m completely unable to build anything, block won’t set where I ask/clic.
And I also tried to save my template and put it elsewhere or in another game and It seems that after the first error (above) the template saved is bugged. This error appears :

develop-2494 (x64)
...nehearth/components/building/building_component.luac:240: assertion failed!
stack traceback:
	[C]: ?
	[C]: in function 'assert'
	...nehearth/components/building/building_component.luac:240: in function 'load_from_template'
	stonehearth/lib/build_util.luac:44: in function 'load_structure_from_template'
	stonehearth/lib/build_util.luac:48: in function 'load_all_structures_from_template'
	stonehearth/lib/build_util.luac:170: in function 'restore_template'
	...th/services/client/build_editor/template_editor.luac:10: in function '_restore_template'
	...th/services/client/build_editor/template_editor.luac:15: in function 'go'
	...rvices/client/build_editor/build_editor_service.luac:39: in function <...rvices/client/build_editor/build_editor_service.luac:39>

develop-2494 (x64)
c++ exception: lua runtime error
stack traceback:

The only solution to build template I found is to make a lot of save of the template and the game because when the error appears It corrupted everything about building gameplay :grimacing:

2 Likes

The next time it happens, can you send us a screenshot? The error is saying that you’re adding the block to a thing that for some reason doesn’t exist. Either, we shouldn’t allow this case, or we should fix the thing that isn’t there, but we can’t be sure which it is without more data. Anything you might be able to send on would be useful!

3 Likes

Ok I’m gonna simulate it :wink:

2 Likes

After rebuilding the same building the error finally happen (but took more time ahah) :

I’m building a roof only with single roof to have a roof that go down to the floor (like a “tent roof”). I add blocks in line like we can see a bit in the screen. The error happen when I tried to add a single block by using the previous one to set it (red circle in the screen).
I can’t provide anything better than this because the error has no “visual effects” (if it’s what you want), after we just can’t set any block (block don’t set where we click as said in my first post).

This afternoon (in France) I also had an error while loading a game where this problem appeared (by using the button “continue” on the main screen) but I didn’t save the error and I didn’t succeed to simulate it or get it another time…

2 Likes