Destroy StockPile with 214 elements

Title:
Destroy StockPile with 214 elements
Summary:
When I destroy Stockpile (mayber it was older in game) i recibe the error in the notes
Steps to reproduce:

  1. Select Stockpile
  2. remove
  3. Error

Expected Results:
Remove stockpile with out error.
Actual Results:
The stockpile was remove but the windows show the errror msj . The game is still working normal.
Notes:
Error 1:

release-483 (x64)
radiant/modules/entities.luac:37: attempt to call method 'is_valid' (a nil value)
stack traceback:
    [C]: in function 'is_valid'
    radiant/modules/entities.luac:37: in function 'destroy_entity'
    stonehearth/call_handlers/entities_call_handler.luac:5: in function <stonehearth/call_handlers/entities_call_handler.luac:5>

Error 2:

release-483 (x64)
c++ exception: lua runtime error
    stack traceback:

Destroy StockPile with 214 elements
Attachments:

Versions and Mods:
Alpha 13
System Information:

1 Like

Hmm…thought this was fixed back in Alpha 12. Will page @Albert to take a look.

1 Like

I make the same thing but with few stockpile of 400, 200 and recibe this error
The game is working normaly… i think!!

release-483 (x64)
std::logic_error: 'invalid reference in native get_id'
stack traceback:
    [C]: in function 'get_id'
    stonehearth/services/server/inventory/inventory.luac:304: in function 'is_storage_for_filter_fn'
    stonehearth/ai/actions/restock_storage_action.luac:7: 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'
    ...onehearth/services/server/tasks/run_task_action.luac:56: in function <...onehearth/services/server/tasks/run_task_action.luac:53>
    [C]: ?
    ...
    [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:186: 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>

I think I just had a similar error doing a similar thing (was trying to move a stockpile into containers so I tried to delete it). The game asks me to post my user id which is “f9ce8a52-2878-11e5-89d7-00241d731cc2”

crash reports:
(1/4)

release-489 (x64)
radiant/modules/entities.luac:37: attempt to call method 'is_valid' (a nil value)
stack traceback:
    [C]: in function 'is_valid'
    radiant/modules/entities.luac:37: in function 'destroy_entity'
    stonehearth/call_handlers/entities_call_handler.luac:5: in function <stonehearth/call_handlers/entities_call_handler.luac:5>

(2/4)

release-489 (x64)
c++ exception: lua runtime error
stack traceback:

(3/4)

release-489 (x64)
radiant/modules/entities.luac:382: attempt to index a nil value
stack traceback:
    radiant/modules/entities.luac:382: in function 'trace_location'
    ...ai/actions/pickup_item_type_from_storage_action.luac:7: in function 'start'
    stonehearth/services/server/ai/compound_action.luac:123: in function <stonehearth/services/server/ai/compound_action.luac:122>
    [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'
    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:186: 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>

(4/4)

release-489 (x64)
invalid initial state "starting" in run
stack traceback:
    [C]: ?
    [C]: in function 'run'
    stonehearth/services/server/ai/compound_action.luac:133: in function <stonehearth/services/server/ai/compound_action.luac:129>
    [C]: ?
    [C]: ?
    [C]: in function 'run'
    stonehearth/services/server/ai/compound_action.luac:133: in function <stonehearth/services/server/ai/compound_action.luac:129>
    [C]: ?
    [C]: ?
    [C]: in function 'run'
    stonehearth/services/server/ai/compound_action.luac:133: in function 'run'
    ...
    [C]: in function 'run'
    stonehearth/services/server/ai/compound_action.luac:133: in function <stonehearth/services/server/ai/compound_action.luac:129>
    [C]: ?
    [C]: ?
    [C]: in function 'run'
    stonehearth/components/ai/ai_component.luac:186: 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>

edit: game continues to run after the error

Hey @milky, welcome to the Discourse! Thanks for the error reports, and the user id!