[Res] [Dev 2630] Invalid Reference in native get_id

develop-2617 (x64)
std::logic_error: 'invalid reference in native get_id’
stack traceback:
stonehearth/components/ai/execution_frame.luac:672: in function <stonehearth/components/ai/execution_frame.luac:665>
[C]: in function ‘get_id’
…tonehearth/components/crafter/crafter_component.luac:34: in function ‘remove_first_item’
…tonehearth/ai/actions/drop_crafting_ingredients.luac:6: in function 'call_fn’
stonehearth/components/ai/execution_unit_v2.luac:22: in function '_call_run’
stonehearth/components/ai/execution_unit_v2.luac:198: in function '_run_from_started’
stonehearth/components/ai/execution_unit_v2.luac:141: in function '_run’
stonehearth/components/ai/execution_frame.luac:456: in function <stonehearth/components/ai/execution_frame.luac:456>
[C]: in function 'xpcall’
stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call’
stonehearth/components/ai/execution_frame.luac:456: in function ‘_run_from_started’

stonehearth/components/ai/execution_frame.luac:129: in function '_run’
stonehearth/components/ai/execution_frame.luac:360: in function <stonehearth/components/ai/execution_frame.luac:352>
[C]: in function 'xpcall’
stonehearth/components/ai/execution_frame.luac:674: in function '_protected_call’
stonehearth/components/ai/execution_frame.luac:362: in function 'run’
stonehearth/components/ai/ai_component.luac:178: in function '_thread_main’
stonehearth/services/server/threads/thread.luac:90: in function <stonehearth/services/server/threads/thread.luac:89>
[C]: in function 'xpcall’
stonehearth/services/server/threads/thread.luac:89: in function 'f’
radiant/lib/env.luac:8: in function <radiant/lib/env.luac:8>

Hello, @Hieronymous :smile:

Could you please provide a little more of context?
What was happening in the game when this error was prompted?

1 Like

I wish I could. I’ve gotten the bug a few times and it’s seemed to be completely random. I have no idea what sparked it or how to reproduce or any salient information about what might have triggered it.

1 Like

Ok, I just got this error again in the first few minutes of a fresh game in the newest build. It happened when I placed my first stockpile. There were actually two bugs:

develop-2630 (x64)
std::logic_error: 'invalid reference in native get_id’
stack traceback:
[C]: in function 'get_id’
stonehearth/services/server/town/town.luac:123: in function 'item_has_been_looted’
stonehearth/services/server/inventory/inventory.luac:252: in function '_filter_passes’
stonehearth/services/server/inventory/inventory.luac:286: in function ‘filter_fn’
…i/actions/pickup_item_type_from_backpack_action.luac:12: in function <…i/actions/pickup_item_type_from_backpack_action.luac:4>
[C]: in function 'start_thinking’
stonehearth/services/server/ai/compound_action.luac:86: in function '_start_thinking_on_frame’
stonehearth/services/server/ai/compound_action.luac:74: in function 'start_thinking’
stonehearth/ai/actions/loop_action.luac:19: in function '_start_next_loop’
stonehearth/ai/actions/loop_action.luac:49: in function '_loop_set_think_output’
stonehearth/ai/actions/loop_action.luac:6: in function ‘set_think_output’

[C]: in function 'execute’
stonehearth/ai/actions/idle_top_action.luac:5: in function <stonehearth/ai/actions/idle_top_action.luac:3>
[C]: ?
[C]: ?
[C]: in function 'run’
stonehearth/components/ai/ai_component.luac:177: in function '_thread_main’
stonehearth/services/server/threads/thread.luac:90: in function <stonehearth/services/server/threads/thread.luac:89>
[C]: in function 'xpcall’
stonehearth/services/server/threads/thread.luac:89: in function 'f’
radiant/lib/env.luac:8: in function <radiant/lib/env.luac:8>


develop-2630 (x64)
bad frame trasition from “stop” from "starting_thinking"
stack traceback:
[C]: ?
[C]: in function 'stop’
stonehearth/services/server/ai/compound_action.luac:140: in function 'stop’
stonehearth/ai/actions/loop_action.luac:93: in function '_prune_unused_loops’
stonehearth/ai/actions/loop_action.luac:89: in function '_finish_building_loops’
stonehearth/ai/actions/loop_action.luac:88: in function '_fn’
radiant/controllers/timer_controller.luac:33: in function 'fire’
radiant/controllers/time_tracker_controller.luac:9: in function <radiant/controllers/time_tracker_controller.luac:9>
[C]: in function 'xpcall’
radiant/controllers/time_tracker_controller.luac:9: in function 'set_now’
radiant/controllers/time_tracker_controller.luac:20: in function 'increment_now’
radiant/modules/timer.luac:6: in function 'instance’
radiant/modules/events.luac:59: in function <radiant/modules/events.luac:57>
[C]: in function 'xpcall’
radiant/modules/events.luac:57: in function 'trigger’
radiant/modules/events.luac:78: in function '_trigger_gameloop’
radiant/modules/events.luac:87: in function '_update’
radiant/server.luac:19: in function <radiant/server.luac:17>

I’d saved right before (autosave), but reloading the save and doing the same thing doesn’t seem to replicate it.

Screenshot of what was happening in game:

http://images.akamai.steamusercontent.com/ugc/396672870846940408/0BBD0E30EBE2E52BF6EC11FC8CC963455BFAA0BE/

System info: windows 7 professional, 64 bit, Intel Core i5 750 @ 2.67 Hhz, 8 MB ram.

Hello guyz ^^

I just started a game then i put a stockpile and immediately this error occured :frowning:

screen :


develop-2630 (x64)
std::logic_error: ‘invalid reference in native get_id’
stack traceback:
[C]: in function ‘get_id’
stonehearth/services/server/town/town.luac:123: in function ‘item_has_been_looted’
stonehearth/services/server/inventory/inventory.luac:252: in function ‘_filter_passes’
stonehearth/services/server/inventory/inventory.luac:286: in function ‘filter_fn’
…i/actions/pickup_item_type_from_backpack_action.luac:12: in function <…i/actions/pickup_item_type_from_backpack_action.luac:4>
[C]: in function ‘start_thinking’
stonehearth/services/server/ai/compound_action.luac:86: in function ‘_start_thinking_on_frame’
stonehearth/services/server/ai/compound_action.luac:74: in function ‘start_thinking’
stonehearth/ai/actions/loop_action.luac:19: in function ‘_start_next_loop’
stonehearth/ai/actions/loop_action.luac:44: in function <stonehearth/ai/actions/loop_action.luac:35>
[C]: in function ‘start_thinking’

[C]: in function ‘execute’
stonehearth/ai/actions/idle_top_action.luac:5: in function <stonehearth/ai/actions/idle_top_action.luac:3>
[C]: ?
[C]: ?
[C]: in function ‘run’
stonehearth/components/ai/ai_component.luac:177: in function ‘_thread_main’
stonehearth/services/server/threads/thread.luac:90: in function <stonehearth/services/server/threads/thread.luac:89>
[C]: in function ‘xpcall’
stonehearth/services/server/threads/thread.luac:89: in function ‘f’
radiant/lib/env.luac:8: in function <radiant/lib/env.luac:8>

And this one too :

develop-2630 (x64)
bad frame trasition from “stop” from “starting_thinking”
stack traceback:
[C]: ?
[C]: in function ‘stop’
stonehearth/services/server/ai/compound_action.luac:140: in function ‘stop’
stonehearth/ai/actions/loop_action.luac:93: in function ‘_prune_unused_loops’
stonehearth/ai/actions/loop_action.luac:89: in function ‘_finish_building_loops’
stonehearth/ai/actions/loop_action.luac:88: in function ‘_fn’
radiant/controllers/timer_controller.luac:33: in function ‘fire’
radiant/controllers/time_tracker_controller.luac:9: in function <radiant/controllers/time_tracker_controller.luac:9>
[C]: in function ‘xpcall’
radiant/controllers/time_tracker_controller.luac:9: in function ‘set_now’
radiant/controllers/time_tracker_controller.luac:20: in function ‘increment_now’
radiant/modules/timer.luac:6: in function ‘instance’
radiant/modules/events.luac:59: in function <radiant/modules/events.luac:57>
[C]: in function ‘xpcall’
radiant/modules/events.luac:57: in function ‘trigger’
radiant/modules/events.luac:78: in function ‘_trigger_gameloop’
radiant/modules/events.luac:87: in function ‘_update’
radiant/server.luac:19: in function <radiant/server.luac:17>

hI @OlderThanBefore, does the game continue to run if you close the error? Will the hearthlings put stuff in the stockpile?

Edit: Paging @8BitCrab, something seems to be preventing the images from fully appearing…

2 Likes

thanks, for some reason the discourse doesnt really like that sit, but i embedded them so they should be good now.

Paging @8BitCrab again, just realized this may be a duplicate. See [Res] [Dev 2630] Invalid Reference in native get_id

thanks i merged and updated the title :smile:

Hello Jomaxro sorry for the wait :stuck_out_tongue:
Yes the game keep going well !
I don’t see something unusual after the error :smiley:

But it happens everytime i want to put a stockpile; everywhere :stuck_out_tongue: !

2 Likes

do you have the default set to none in the settings? i know there was a bug awhile back that changing a stockpile from defaulted none to all would cause an error…

1 Like

Nope it isn’t turned on !

1 Like

My stockpiles default normally, I haven’t messed with that setting. And I’ve gotten this bug message at other times than just when placing stockpiles.

2 Likes

@OlderThanBefore and @Hieronymous, both of your errors show that you are running the latest alpha. By chance, have either of you installed any mods or modified any files yourself?

Also, is possible, could you post a save folder for a game with this issue? You can upload your save to a cloud storage site like Dropbox or Google Drive and share the link here. That will allow TR staff like @Albert, @yshan, and @Ponder to take a look at this in more detail!

1 Like

I messed up with the user setting.json in the older version so i reinstalled the game and i get the latest version just after :smiley:

So i’m not using mod and the files seems ok !
i post you my user setting in case :o:

{
“user_id” : “39cf45fa-20d2-11e5-8d7e-202564d6820e”,
“collect_analytics” : true,
“alpha_welcome” : {
“hide” : true
},
“tutorial” : {
“hideStartingTutorial” : true
},
“enable_auto_save” : true,
“renderer” : {
“run_once” : true,
“use_high_quality” : true,
“enable_ssao” : true,
“enable_shadows” : true,
“msaa_samples” : 1,
“shadow_quality” : 5,
“max_lights” : 250,
“enable_vsync” : true,
“enable_fullscreen” : true,
“screen_width” : 1920,
“screen_height” : 1080,
“draw_distance” : 1000,
“last_window_x” : 0,
“last_window_y” : 0,
“last_screen_x” : 0,
“last_screen_y” : 0
},
“audio” : {
“bgm_volume” : 1,
“efx_volume” : 1
},
“force_32_bit” : false
}

1 Like

I haven’t installed any mods or made any file changes no. I can upload a save from right before it happened but I don’t have one where it happened – tried to replicate by reloading the autosave and then the autosave autosaved over (and it didn’t replicate).

1 Like

i also got this exact 2 errors. fresh game, no mods nothing. and got it for placing a stock pile.

1 Like

I tryed to place a new stock pile but i get no error this time :confused: I’m sorry, it was in the really early game with my first stockpile !
When the error poped up first time, i leaved my world and created another one just to know if it wasn’t random stuff :stuck_out_tongue: but it does happen in the second game, only with the first stockpile :confused:

I can’t reproduce it right now ! If it happen one more time, i’ll try to get a savefile for you mate !

Edit :
Was trying to launch a new world to reproduce the error but this time, nothing popped up ! I exited the game before doing this just to be sure… i don’t know if it’s random or have to do something with the location you put it !

1 Like

Happened again, or at least a SIMILAR error happened (same error message).

This time wasn’t placing a stockpile.

develop-2630 (x64)
std::logic_error: 'invalid reference in native get_id’
stack traceback:
[C]: in function 'get_id’
stonehearth/services/server/town/town.luac:123: in function ‘item_has_been_looted’
…tions/put_restockable_item_into_backpack_action.luac:4: in function ‘should_pick_up_item’
…tions/put_restockable_item_into_backpack_action.luac:25: in function ‘pickup_item_off_ground_filter’
…tions/put_restockable_item_into_backpack_action.luac:37: in function 'filter_fn’
stonehearth/ai/actions/find_path_to_entity_type.luac:21: in function <stonehearth/ai/actions/find_path_to_entity_type.luac:21>
[C]: ?
[C]: in function 'start’
stonehearth/services/server/ai/compound_action.luac:125: in function <stonehearth/services/server/ai/compound_action.luac:122>
[C]: ?
[C]: in function ‘start’

[C]: ?
[C]: in function 'start’
stonehearth/services/server/ai/compound_action.luac:125: in function <stonehearth/services/server/ai/compound_action.luac:122>
[C]: ?
[C]: in function 'run’
stonehearth/components/ai/ai_component.luac:177: in function '_thread_main’
stonehearth/services/server/threads/thread.luac:90: in function <stonehearth/services/server/threads/thread.luac:89>
[C]: in function 'xpcall’
stonehearth/services/server/threads/thread.luac:89: in function 'f’
radiant/lib/env.luac:8: in function <radiant/lib/env.luac:8>

1 Like

@Hieronymous, if you weren’t placing a stockpile, what were you doing when the error occurred?

2 Likes