Mining Drones

by Klonan

Adds mining drones and mining depots

Content
3 years ago
0.17 - 1.1
85.6K
Mining

b Crash when deleting chunks

4 years ago

Shortly after deleting chunks Mining Drones causes a non-recoverable error, even after changing the raduis of detete chunks to 10 so none of the mining drones are in deleted chunks. Not sure if it is mining drones fault or if its just the first mod to cause a problem.

823.131 Script @DeleteEmptyChunks/control.lua:121: Forces: "player", "player"
823.131 Script @DeleteEmptyChunks/control.lua:121: Deleting empty chunks except those with paving and within radius 10
823.131 Script @DeleteEmptyChunks/control.lua:121: Detected 65 paving tiles: 7 vanilla and 58 from mods
826.291 Script @DeleteEmptyChunks/control.lua:121: Starting with 18728 chunks on "nauvis" surface, 15674 visible
826.291 Script @DeleteEmptyChunks/control.lua:121: Keeping 9284 chunks: 750 with entities, 22 with paving, and 8512 adjacent
826.291 Script @DeleteEmptyChunks/control.lua:121: Deleted 9444 chunks
830.746 Error MainLoop.cpp:1195: Exception at tick 19549622: The mod Mining Drones caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Mining_Drones::on_ai_command_completed (ID 113)
LuaInventory API call when LuaInventory was invalid.
stack traceback:
Mining_Drones/script/mining_drone.lua:239: in function 'process_mining'
Mining_Drones/script/mining_drone.lua:370: in function 'update'
Mining_Drones/script/mining_drone.lua:608: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>
stack traceback:
[C]: in function 'index'
__Mining_Drones
/script/mining_drone.lua:239: in function 'process_mining'
Mining_Drones/script/mining_drone.lua:370: in function 'update'
Mining_Drones/script/mining_drone.lua:608: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>

Thanks

4 years ago

This bug doesnt happen if the radius is large enough to delete 0 chunks but as soon as one chunk is deleted it crashes:
1112.160 Script @DeleteEmptyChunks/control.lua:121: Forces: "player", "player"
1112.160 Script @DeleteEmptyChunks/control.lua:121: Deleting empty chunks except those within radius 9999
1112.736 Script @DeleteEmptyChunks/control.lua:121: Starting with 18728 chunks on "nauvis" surface, 15673 visible
1112.736 Script @DeleteEmptyChunks/control.lua:121: Keeping 18727 chunks: 750 with entities, and 17977 adjacent
1112.736 Script @DeleteEmptyChunks/control.lua:121: Deleted 1 chunks
1113.518 Error MainLoop.cpp:1195: Exception at tick 19549272: The mod Mining Drones caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Mining_Drones::on_ai_command_completed (ID 113)
LuaInventory API call when LuaInventory was invalid.
stack traceback:
Mining_Drones/script/mining_drone.lua:239: in function 'process_mining'
Mining_Drones/script/mining_drone.lua:370: in function 'update'
Mining_Drones/script/mining_drone.lua:608: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>
stack traceback:
[C]: in function 'index'
__Mining_Drones
/script/mining_drone.lua:239: in function 'process_mining'
Mining_Drones/script/mining_drone.lua:370: in function 'update'
Mining_Drones/script/mining_drone.lua:608: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>

4 years ago

Oh, Its deleting the chunk that has my 'proxy chests' in it, which is the chunk at position -1,000,000, -1,000,000

4 years ago

I see, I'll ask the mod author if theres a way to blacklist chunks, if that doesnt work I guess ill just go to -1000000 -1000000 and build something there. Thanks

4 years ago

Hey Klonan, If I may make a suggestion. You could move your proxy chests to another surface. That way there isn't a chance that the player may build in that area and any mod that manipulates the 'nauvis' surface will not interfere with your mod.

4 years ago

Having another surface exist adds a lot of overhead to every update, since it also spawns extra managers for updating things, like electric networks, pollution, fluids, transport belts, etc.

I will probably move the proxies somewhere in a future update

4 years ago
(updated 4 years ago)

If the chunk where the proxies are was charted, they should be detected and not deleted. They would also need to be on a player's force.

4 years ago

The chunk isn't charted, also they are on neutral force at position 1,000,000, 1000,000 (Not -1,000,000 as I said earlier)

4 years ago

I'm adding detection of your mod and white-listing that chunk. If you do change how you're handling the inventory, please let me know.

4 years ago

I dont know if i have the same issue then you guys but this is what happen if im deleting one Special mining building while all other buildings are good with deleting and rebuilding.
Ive tried taking all drones and materials out before deleting it but same error happens.
Like i said its just this one building

Error while running event Mining_Drones::on_player_mined_entity (ID 65)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
Mining_Drones/script/mining_drone.lua:505: in function 'clear_depot'
Mining_Drones/script/mining_drone.lua:418: in function 'clear_things'
Mining_Drones/script/mining_drone.lua:424: in function 'cancel_command'
Mining_Drones/script/mining_depot.lua:771: in function 'handle_depot_deletion'
Mining_Drones/script/mining_depot.lua:861: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>
stack traceback:
[C]: in function 'index'
__Mining_Drones
/script/mining_drone.lua:505: in function 'clear_depot'
Mining_Drones/script/mining_drone.lua:418: in function 'clear_things'
Mining_Drones/script/mining_drone.lua:424: in function 'cancel_command'
Mining_Drones/script/mining_depot.lua:771: in function 'handle_depot_deletion'
Mining_Drones/script/mining_depot.lua:861: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>

4 years ago

I dont know if i have the same issue then you guys but this is what happen if im deleting one Special mining building while all other buildings are good with deleting and rebuilding.
Ive tried taking all drones and materials out before deleting it but same error happens.
Like i said its just this one building

Error while running event Mining_Drones::on_player_mined_entity (ID 65)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
Mining_Drones/script/mining_drone.lua:505: in function 'clear_depot'
Mining_Drones/script/mining_drone.lua:418: in function 'clear_things'
Mining_Drones/script/mining_drone.lua:424: in function 'cancel_command'
Mining_Drones/script/mining_depot.lua:771: in function 'handle_depot_deletion'
Mining_Drones/script/mining_depot.lua:861: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>
stack traceback:
[C]: in function 'index'
__Mining_Drones
/script/mining_drone.lua:505: in function 'clear_depot'
Mining_Drones/script/mining_drone.lua:418: in function 'clear_things'
Mining_Drones/script/mining_drone.lua:424: in function 'cancel_command'
Mining_Drones/script/mining_depot.lua:771: in function 'handle_depot_deletion'
Mining_Drones/script/mining_depot.lua:861: in function 'handler'
core/lualib/event_handler.lua:44: in function <core/lualib/event_handler.lua:42>

4 years ago

Can you provide a save game?

4 years ago

I have removed the proxy inventory system, so deleting that chunk should be fine now

New response